react-images-uploader
react-images-uploader copied to clipboard
Base64 Upload
I need to upload my pictures via base64 sending also other information. The request payload should look like that:
{
"image": "base64ofTheLoadedPic",
"user": 1,
"product": 3
}
Is there a way that allows me to change the way the data is sent?
there are no way to do this yet. you can send a PR with support for this
Don't use base64... or JSON representation when uploading binary files... use multipart upload...
-1 on this feature. you should not send files as base64. use proper storage and save files with multipart requests
i'm also going to vote -1 on this, base64 uploads increase server side RAM usage by too much to be worth it. It's better to just submit the form as multipart, as @kirillDanshin said.