vutoan266 / react-images-uploading

The simple images uploader applied Render Props pattern that allows you to fully control UI component and behaviors.
https://github.com/vutoan266/react-images-uploading
MIT License
320 stars 52 forks source link

upload to API accept multipart/form-data instead of application/json #81

Closed tesshsu closed 3 years ago

tesshsu commented 3 years ago

Hi team, Sorry again for one questions The library once choice will send as in json format: uploads: Array(2) 0: data_url: "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD" file: File lastModified: 1604325396020 lastModifiedDate: Mon Nov 02 2020 14:56:36 GMT+0100 (中歐標準時間) {} name: "4.jpg" size: 83005 type: "image/jpeg" webkitRelativePath: ""

Will it possible add any parametre to change to multipart/form-data instead of application/json ?

Appreciate your help

vutoan266 commented 3 years ago

Sorry I am late again :))) I missed notifications because gmail does not send (or sent to spam hub) to me :( Your requirement is changing the method of encoding to multipart/form-data but that not on my component side. You could change it in your Request function. Follow this Feel free to ask me if you have any more questions.