Unable to upload zip file to azure storage via lambda function

Ankesh Damahe 1 Reputation point
2021-03-05T12:32:25.697+00:00

Working on zip file upload to azure storage but call is not working on that , I am able to uplaod txt file to azure storage working on node js.
`await blobService.createBlockBlobFromStream('info-staffing-data-dump', 'axyz/'+file, file, function(error: any, result: any, response: any) {
console.log('within rresp');
if (!error) {
// file uploaded
console.log("response",response) ;

                                  } else {
                                        callback(error);
                                        console.log("helloerr",error)
                                  }
                                });`
Azure Storage Explorer
Azure Storage Explorer
An Azure tool that is used to manage cloud storage resources on Windows, macOS, and Linux.
229 questions
Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,668 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,416 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. deherman-MSFT 33,141 Reputation points Microsoft Employee
    2021-03-05T22:22:38.52+00:00

    @Ankesh Damahe
    There are several examples of uploading blobs via node.js which might be helpful to your use-case. Please see if any of these work for you:

    https://learn.microsoft.com/en-us/samples/azure-samples/azure-sdk-for-js-storage-blob-stream-nodejs/stream-blobs-nodejs/
    https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/storage/storage-blob/samples/javascript/advanced.js
    https://learn.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-nodejs#upload-blobs-to-a-container
    https://stackoverflow.com/questions/63950743/download-azure-blob-stream-to-zip-nodejs
    https://stackoverflow.com/questions/64767739/upload-large-files-to-blob-storage-without-saving-file-locally-mean-stack

    Hopefully one of these will work for your use-case. If you are still having issues please do let me know. I also recommend posting your question on StackOverflow as you will find more experts in node.js.

    -------------------------------

    Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

  2. Ankesh Damahe 1 Reputation point
    2021-03-08T08:03:47.503+00:00

    Thanks for reply.
    Above link are helpful and all codes are working offline but when I deploy that code to lambda then upload function is not working only for zip,xlsx and pdf. I am able to upload txt file via lambda

    0 comments No comments