-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multiple file upload does not work #1469
Comments
This might help http://stackoverflow.com/a/33477879/1425525. Not an issue, ask questions on stackoverflow with the retrofit tag. |
using MultipartBuilder gives an error: got it working without it though :) thx for pointing me in the right direction |
@psyopussy |
Since it's working and #1140 is tracking normal filename-based part uploading I'm closing. |
if i follow the docs: http://square.github.io/retrofit/2.x/retrofit/retrofit2/http/PartMap.html
it does not work,
i get a lot of gibberish on the server side and also it seems like it is only trying to upload the last image of the list of images.
if i try it like this only the last image in the map is uploaded:
HashMap<String, RequestBody> partMap = new HashMap<String, RequestBody>();
partMap.put("file"; filename="" + file.getName(), requestBody);
partMap.put("file"; filename="" + file2.getName(), requestBody);
Call call = service.upload(partMap);
@multipart
@post("/upload")
Call upload(
@PartMap() Map<String, RequestBody> partMap
);
The text was updated successfully, but these errors were encountered: