Join Slack
Communities
Powered by
Hi, I need to upload a jpeg to my server which acc...
# squarelibraries
r
Rak
03/04/2022, 10:15 AM
Hi, I need to upload a jpeg to my server which accepts multipart(?). The image was taken with the camera on mobile (examples around the web reference browsers) and is held in memory. How to upload with retrofit? The docs talk about
RequestBody
but not sure how to put it all together.
p
Paul Woitaschek
03/04/2022, 11:00 AM
https://stackoverflow.com/questions/39953457/how-to-upload-an-image-file-in-retrofit-2
Paul Woitaschek
03/04/2022, 11:01 AM
https://stackoverflow.com/questions/7769806/convert-bitmap-to-file
r
Rak
03/04/2022, 11:20 AM
Do I have to convert the in memory bitmap to a file?
y
yschimke
03/04/2022, 2:23 PM
No, each part is a RequestBody, so can be converted from File, String, Bytes or anything really.
2
Views
Open in Slack
Previous
Next