react-images-uploader icon indicating copy to clipboard operation
react-images-uploader copied to clipboard

Base64 Upload

Open NicholasPeretti opened this issue 7 years ago • 4 comments

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?

NicholasPeretti avatar Sep 09 '17 11:09 NicholasPeretti

there are no way to do this yet. you can send a PR with support for this

aleksei0807 avatar Sep 29 '17 13:09 aleksei0807

Don't use base64... or JSON representation when uploading binary files... use multipart upload...

jimmywarting avatar Oct 11 '17 20:10 jimmywarting

-1 on this feature. you should not send files as base64. use proper storage and save files with multipart requests

kirillDanshin avatar Mar 15 '18 16:03 kirillDanshin

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.

jediofthecode avatar Apr 20 '18 08:04 jediofthecode