Android Question Request URI Too Long

ilan

Expert
Licensed User
Longtime User
hi

i am updating a mysql db using PHP Get request. i am using httpjob.Download2 with key/value parameters. everything work fine but if i want to upload an image converted to base64 i am getting this error:


i need to mention that i cannot use B4j Server tool because this is a shared hosting so i have to use PHP and i also DON'T want to use FTP and upload the image. i know it is a better approach but because it is a small image (just an avatar of around 10kb) i would like to stay with sql db only and no ftp upload.
what could i do to archive it? it seems like there is a limit of the length of the url that my hosting allows. is there another way the get around this?
i was thinking of using BLOB instead and upload the image as a byte array using POST request. what do you think?
 

DonManfred

Expert
Licensed User
Longtime User
You should use PostMultipart and handle the fileupload correctly in PHP.
You are not limited to any amount of data using POST-Requests

A GET-Request can only have a limited amount of data.

 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…