Reputation: 636
I set up Dio as a http client to upload image files to my server. I'm using image_picker. Initially, when I set it up like a month ago, it worked fine. But I later found out it stopped working. It still works on Android emulator but not on a physical device.
Upvotes: 1
Views: 953
Reputation: 636
After getting the solution to this, I felt I should delete this answer as the solution seems kinda obvious. But on a second thought, I'll leave it in because this answer might save someone hours of debug. I found out that the images files were large and the uploading process didn't complete before Dio.sendTimeout returns. So I increase the sendTimeout and reduced the size of the image file (picked using Image_picker) PickedFile.imageQuality.
Upvotes: 1