I am trying to upload excel file to azure blob storage
import { DefaultAzureCredential } from '@azure/identity';
import { BlobServiceClient } from '@azure/storage-blob';
// Enter your storage account name
const account = process.env.ACCOUNT_NAME;
// Unique name for the container
const containerName = process.env.CONTAINER_NAME;
// Azure AD Credential information is required to run this sample:
if (
!process.env.AZURE_TENANT_ID ||
!process.env.AZURE_CLIENT_ID ||
!process.env.AZURE_CLIENT_SECRET || !account || !containerName
) {
return next(SystemResponse.badRequestError('Azure AD authentication information not provided, but it is required to run this sample. Exiting.'));
}
const defaultAzureCredential = new DefaultAzureCredential();
const blobServiceClient = new BlobServiceClient(
`https://${account}.blob.core.windows.net`,
defaultAzureCredential,
);
// Get a reference to a container
const containerClient = blobServiceClient.getContainerClient(containerName);
// Upload data to the blob
const blobName = `${req.files.file.name.split('.')[0]}+${new Date().getTime()}.${req.files.file.name.split('.')[1]}`;
// create blobClient for container
const blockBlobClient = containerClient.getBlockBlobClient(blobName);
// upload file
const uploadBlobResponse = await blockBlobClient.upload(`${containerName}${req.files.file.path}`, req.files.file.size);
i am using postman to upload excel file , but , only file path is stored in excel file not , actually content ,how can i solve this issue plz help ? && on downloading file name is coming in response