Upload an image in jquery mobile

I was required to develop a mobile application of the existing system, and I have recently learnt about Jquery Mobile, and I was fascinated that I can use php with Jquery Mobile which will make my task more simple. My recent problem is with the uploading the image from the mobile devices memory. Is it possible to upload images and store it in a BLOB field in a database table? If so is done the 'normal' php way or is there another way of doing it in Jquery Mobile.

Thank you

Upvotes: 1

Views: 7889

Answers (2)

Rab
Rab

Reputation: 35572

If you want to use file uploads with jQuery Mobile you have to do two things:

1) Turn off Ajax navigation using data-ajax="false" on your form definition because you can't upload files using Ajax.

2) Specify the appropriate encoding type of enctype="multipart/form-data" on your form.

Upvotes: 7

mubarakrocky
mubarakrocky

Reputation: 48

Do just normal way of file uploading in HTML. Follow for example http://www.w3schools.com/php/php_file_upload.asp

Upvotes: 1

Related Questions