I have a NodeJS backend which use the official blob storage library (@azure/storage-blob) from Microsoft to manage my Blob Storage:
https://www.npmjs.com/package/@azure/storage-blob
It is necessary to move a blob from one folder, to another. Unfortunately I can't find any documentation for that.
What I did until now is:
const { BlobServiceClient } = require("@azure/storage-blob");
const blobServiceClient = BlobServiceClient.fromConnectionString(process.env.storageconnection);
const containerClient = blobServiceClient.getContainerClient('import');
const blobClient = containerClient.getBlobClient('toImport/' + req.body.file);
const downloadBlockBlobResponse = await blobClient.download();
... do some stuff with the value of the files
Like you can see in the code, I read a file from folder "toImport". After that I want to move the file to another folder "finished". Is that possible? Maybe I need to create a copy of the file and delete the old one?
Maybe I need to create a copy of the file and delete the old one?
- That's exactly you will need to do. There's no need for you to download and upload. - Gaurav Mantri