79586124

Date: 2025-04-22 09:53:54
Score: 2
Natty:
Report link

ok... I found a simple and easy way to achive this... Simple use the "uploadData" function from BlockBlobClient with an arrayBuffer from the uploaded file :)

let formData = await req.formData();
let file = formData.get( "file" );
let buffer = file.arrayBuffer();
await blockBlobClient.uploadData( buffer );

So i can upload my files to azure blobstorage through a simple html file-form upload :)

uploadData function:

https://learn.microsoft.com/en-us/javascript/api/@azure/storage-blob/blockblobclient?view=azure-node-latest#@azure-storage-blob-blockblobclient-uploaddata

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Puccini