IAxisDownloads
Interface in Oadm.Sdk.Plugins · Oadm.Sdk.dll
Files from www.axis.com that need the MyAxis sign-in of the user who started the task (SDK 0.9.0, docs/spec/myaxis.md “For plugins”): AXIS OS images below /ftp/pub_soft/MPQT/ and /ftp/pub_soft/PACS/. The host downloads them with that user’s session, which never reaches the plugin, checks size and SHA-256 and keeps them in its cache for 7 days. Tasks that need the same file share one download.
public interface IAxisDownloadsProperties
Section titled “Properties”HasSession
Section titled “HasSession”bool HasSession { get; }Whether the user who started the task is signed in to MyAxis.
Methods
Section titled “Methods”DownloadAsync
Section titled “DownloadAsync”Task<AxisDownloadedFile> DownloadAsync(Uri uri, string sha256, long size, IProgress<long>? progress, CancellationToken ct)The file at uri, from the cache or downloaded now. sha256 is the hex SHA-256 and size the size in bytes as listed on axis.com (rounded there: AxisDownloadTexts.SizeFits). progress gets the bytes received so far (also while another task’s download of the same file runs). Throws ArgumentException for a URL outside the two download folders and AxisDownloadException with the message for the user when the download fails (no or expired sign-in, network, size or checksum). The file stays until the returned handle is disposed.