sending base64 encoded image in ajax call

2,318 views
Skip to first unread message

puneet

unread,
Mar 20, 2013, 3:30:17 PM3/20/13
to phon...@googlegroups.com
Hi,I am developing a mobile app using phonegap and jquery mobile.Here i am stucked,i am fetching image from mobile gallery using 'Camera api' of phonegap.I am getting this image in base64 encoded form.I want to send this encoded image to server where i want to decode it and to save in a file called 'image.jpg'.
         Problem is making ajax call.On sending, it is showing error:'Requesting URI is too large'.I don't know how  to solve this.Any one have any suggestion please tell me
Thanks In advance...

Michael Butcher

unread,
Mar 21, 2013, 1:05:19 PM3/21/13
to phon...@googlegroups.com
I believe this will solve your problem.

From Stackoverflow:
"Instead of putting the data on the URL you should be putting it in the body of a POST request. You need to add a data value to the object you're passing to the ajax function call. Like this:" 

Reply all
Reply to author
Forward
0 new messages