Fast-Android-Networking icon indicating copy to clipboard operation
Fast-Android-Networking copied to clipboard

Cant send multipart file when the last file is null

Open huzain07 opened this issue 5 years ago • 2 comments

i tried to upload my files and the api cant receive all my file when the last file is null. when i try with postman, my api work well. But when i use my app, my api dont get the file at all.

First scenario : result->not receive all file AndroidNetworking.upload("URL") .addMultipartParameter("data","data param") .addMultipartFile("file",dataFile) .addMultipartFile("photo",null)

Second scenario : result->work well AndroidNetworking.upload("URL") .addMultipartParameter("data","data param") .addMultipartFile("file",null) .addMultipartFile("photo",dataPhoto)

huzain07 avatar Dec 12 '19 09:12 huzain07

I am also facing same issue.

nirmalrevar avatar Jun 10 '20 17:06 nirmalrevar

I use ANRequest.MultiPartBuilder :

ANRequest.MultiPartBuilder<?> request = AndroidNetworking.upload(url); if (file1!=null){ request.addMultipartFile("photo1",file1); }

heskadon avatar Jun 18 '20 07:06 heskadon