Android Question Send image via PostString

ThePuiu

Active Member
Licensed User
Longtime User
I'm trying to send an image and other parameters to a server using a PostString call (OkHttpUtils2). If the image is small everything works fine.
If the image is larger, the length or url is exceeded and I receive error from the server.
How can I transfer more data?
 

DonManfred

Expert
Licensed User
Longtime User
If the image is larger, the length or url is exceeded and I receive error from the server.
If the image makes the url longer then you sending the data as get value and not as post.

You are doing something wrong

As you are providing zero codelines noone can help here
 
Upvote 0

Brandsum

Well-Known Member
Licensed User
I'm trying to send an image and other parameters to a server using a PostString call (OkHttpUtils2). If the image is small everything works fine.
If the image is larger, the length or url is exceeded and I receive error from the server.
How can I transfer more data?
Post string has limitations and it varies server to server. Apache server can handle 4000 characters whereas IIS can handle above 16000 characters. Use PostMultipart to send files along with other values.
 
Upvote 0
Top