【发布时间】:2020-12-29 20:24:29
【问题描述】:
我正在处理reactjs/typescript 应用程序。我正在尝试从 azure storage v2 下载一些文件。下面是我应该下载文件的示例路径。在此路径中,enrichment 为容器名称,其余均为文件夹。我正在尝试从reportdocument 文件夹下载最后修改的文件。
enrichment/report/SAR-1234-56/reportdocument/file1.docs
我在下面尝试了一些东西。
@action
public async reportDownload(sarNumber: string) {
let storage = globals.getGlobals('StorageAccount03');
console.log(storage);
let containerName = globals.getGlobals('StorageAccount03ContainerName');
let marker = undefined;
let allUploadPromise: Array<Promise<unknown>> = [];
const config = {
path: `/Storage/getsastoken/?storageName=${storage}&containerName=${containerName}`,
method: "GET",
success: (url: any) => {
const containerURL: ContainerURL = new ContainerURL(
url,
StorageURL.newPipeline(new AnonymousCredential()));
const listBlobsResponse = containerURL.listBlobFlatSegment(
Aborter.none,
marker,
);
}
};
await handleRequest(config);
}
从这里我正在努力从上述路径下载最新修改的文件。 有人可以帮我解决这个问题吗?任何帮助将不胜感激。谢谢
【问题讨论】:
标签: javascript reactjs typescript azure-storage