0
votes

I'm trying to use the Put Blob Rest API from Postman (at the moment) using also a code generated SAS. If I set the body as binary in postman and I select my file everything works just fine - I get my file in the blob storage as expected. However, if I send the file using a multipart/form-data the file is being uploaded, but I get additional data at the beginning of the file such as: ----------------------------515848534032814231487294 Content-Disposition: form-data; name="file"; filename="my_file.json" Content-Type: application/json

Does anybody know why is that and how I could use multipart/form-data for uploading my file to the blob storage?

Thank you in advance!

1

1 Answers

1
votes

This is the expected behavior when using multipart/form-data.

By using multipart/form-data, the boundary(like this ---515848534032814231487294) is auto-generated in the file. But the blob storage backend does not get rid of it(means remove these lines auto-generated).

And one more thing, multipart/form-data is mostly used in a web project, and you can write a function which is used to processing these extra lines in the backend.