Stream uploaded file to Azure blob storage with Node

后端 未结 4 1714
野的像风
野的像风 2020-12-13 21:18

Using Express with Node, I can upload a file successfully and pass it to Azure storage in the following block of code.

app.get(\'/upload\', function (req, re         


        
4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-13 22:06

    There are different options for uploading binary data (e.g. images) via Azure Storage SDK for Node, not using multipart.

    Based on the Buffer and Stream definitions in Node and manipulating them, these could be handled using almost all the methods for BLOB upload: createWriteStreamToBlockBlob, createBlockBlobFromStream, createBlockBlobFromText.

    References could be found here: Upload a binary data from request body to Azure BLOB storage in Node.js [restify]

提交回复
热议问题