Uploading blob - data is empty
See original GitHub issueHi, I am trying to upload blob (image) along with some params, but no matter what I can’t seem to put the data in the body of the request.
let blob = new Blob(animal.photos, {type: 'image/png'});
axios.post( API_URL + 'v1/files/upload/' + animal.photos[0].name ,
{data: blob},
{
params: {
animalId: response.data.id
}
})
Here’s screenshot of google developer tools.
What I am trying to do is to send the image binary data as the body of the request to the API, not sure where I am going wrong with this.
BTW I get 500 code, because body is empty.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6
Top Results From Across the Web
Uploading blob with FormData, File content is empty
Chrome developer tools doesn't actually show the content of files in form data, check the sever side to see if the file is...
Read more >Blob UploadFromStream saves empty files - MSDN - Microsoft
I am uploading an image file to dev blob storage, but it saves empty 1k files. var blob = container.GetBlobReference(url); blob.Properties.
Read more >Blob - Databricks Community
I am trying to upload blob storage on databricks sql warehouse. I followed this document https://docs.databricks.com/data/data-sources/azure/azure-storage.html.
Read more >How to Prevent Creation of Empty File through Azure Data ...
How to Prevent Creation of Empty File through Azure Data Factory- Azure Data Factory Tutorial 2021, in this video we are going to...
Read more >Empty BLOB Value - Oracle to SQL Server Migration - SQLines
... you can use 0x constant (empty binary string). Using EMPTY_BLOB() in Oracle Let's create a table with a BLOB column in Oracle...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@bericoberin
headers: { 'content-type': 'multipart/form-data' }
The trick is
Handle Blobs requests with Axios the right way