title: Reactjs How to download file from Azure Storage Container
body: <p>I am working on <code>reactjs/typescript</code> applications. I am trying to download some files from azure storage v2. Below is the sample path I am supposed to download files. In this path, enrichment is the container name, and the rest all are folders. I am trying to download the last modified file from <code>reportdocument</code> folder.</p>
  <pre><code>enrichment/report/SAR-1234-56/reportdocument/file1.docs
  </code></pre>
  <p>I tried something below.</p>
  <pre><code>@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&lt;Promise&lt;unknown&gt;&gt; = [];
          const config = {
              path: `/Storage/getsastoken/?storageName=${storage}&amp;containerName=${containerName}`,
              method: &quot;GET&quot;,
              success: (url: any) =&gt; {
  
                  const containerURL: ContainerURL = new ContainerURL(
                      url,
                      StorageURL.newPipeline(new AnonymousCredential()));
                   
                  const listBlobsResponse =  containerURL.listBlobFlatSegment(
                      Aborter.none,
                      marker,
                  );
              }
          };
          await handleRequest(config);
      }
  </code></pre>
  <p>From here I am struggling to download the latest modified file from the above path.
  can someone help me to fix this? Any help would be greatly appreciated. Thank you</p>