Volley-demo
Volley-demo copied to clipboard
MultiPartRequest bug
MultiPartRequest can't upload file, I think the bug is in SslHttpStack, setMultiPartBody(postRequest,request); //setEntity setEntityIfNonEmptyBody(postRequest, request); //setEntity
you have set httpRequest.setEntity(entity) twice, so the MuliPartBody entity is override by getBody entity.
@com314159 There is a MultiPartRequestActivity class in your code?
@annelorayne no.
I have write a demo project, it now can upload file. you can clone it. https://github.com/com314159/VolleyMultiPartRequest
the core code is in MultiPartStack.java
If it can't upload file large than 10M, you should set connection timeout longer or use the default timeout.