如何使用 StorageProvider.Download(...) 下载私人文件?

How to use StorageProvider.Download(...) to download private files?

使用"StorageProvider.Download(...)"时,似乎只能下载上传到public存储的文件。

有没有办法将私人上传的文件下载到我的服务器本地存储?

我正在使用 Azure 外部存储提供商。

谢谢!

示例:

// In this case the file is downloaded to the local filesystem:
&LocalFile.Source = 'LocalFile.txt'
&Result = &StorageProvider.Download('AzurePublicFile.txt', &LocalFile, &Messages)

// In this case the file is not downloaded locally, it only loads a reference to the URI in the Azure blob container:
&LocalFile.Source = 'LocalFile.txt'
&Result = &StorageProvider.GetPrivate('AzurePrivateFile.txt', &LocalFile, 5, &Messages)

尝试这样的事情:

StorageProvider.GetPrivate(...., &File)
&URL = &File.GetURI()
&HttpClient.Execute('GET', &URL)
&HttpClient.ToFile("C:\....")

更新:StorageProvider.DownloadPrivate() 将在 GeneXus 16 升级 2 中可用。