Skip to content Skip to sidebar Skip to footer

Azure Createblockblobfromlocalfile Shows No Such File Or Directory

I am trying to uploading file using azure-storage function createBlockBlobFromLocalFile(). But when i upload the file i am getting error like { Error: ENOENT: no such file or dir

Solution 1:

I reused your sample code above with slight modifications on the blobUri and added the sasKey value and I am able to upload a new block blob to my storage account blob container.

enter image description here

Please make sure that your JavaScript code file above is in the same path as your text file to be uploaded, i.e.

D:\path\yoursamplejs.js
D:\path\task1.txt

To run your script, do this:

D:\path\node yoursamplejs.js

You should expect to see the result output as: "uplaoded" in your case.

I have tested this working with:

azure-storage node module version: 2.8.0

Node.js version: 8.9.4

npm version: 5.6.0

Hope this helps!

Post a Comment for "Azure Createblockblobfromlocalfile Shows No Such File Or Directory"