From this document, there is no example to set Blob Service Properties.
Below is my Sample Code:
let containerClient = blobServiceClient.getContainerClient(CONTAINERNAME),
blockBlobClient = containerClient.getBlockBlobClient(BLOBNAME);
await blockBlobClient.uploadFile(FILEPATH);
Please advise how I can upload a file with setting contentDisposition
and contentType
in properties
of blockBlob.
Please try this way:
const blobOptions = { blobHTTPHeaders: { blobContentType: 'image/jpeg', blobContentDisposition: "attachment; filename=package.jpg" } };
const uploadBlobResponse =await blockBlobClient.uploadFile(filePath,blobOptions);
If there are other questions, please let me know!