creativepsyco / Capricorn

iCreate Mobility Challenge 2012
1 stars 0 forks source link

Upload Image to server #7

Closed amulyakhare closed 12 years ago

amulyakhare commented 12 years ago

Can you guide me, give me some code or reference on how to upload <img src='url/here/'></img> image from jquery/html side to grails server? Do we use JSON? Where is the image stored on server etc etc.

chongivan commented 12 years ago

Can we use like erm URL fb profile pic. If u don't want then I got the code. But not json. Show u tml On Jun 13, 2012 3:59 AM, "Amulya Khare" < reply@reply.github.com> wrote:

Can you guide me, give me some code or reference on how to upload <img src='url/here/'></img> image from jquery/html side to grails server? Do we use JSON? Where is the image stored on server etc etc.


Reply to this email directly or view it on GitHub: https://github.com/creativepsyco/Capricorn/issues/7

amulyakhare commented 12 years ago

oh! Its for uploading images from camera -- that feature!

creativepsyco commented 12 years ago

you will have to upload the image to some public place, it needs to have an independent path.

For the phonegap/jquery side, once you are given the file location by the camera view, you can use this to upload the file to the server: http://docs.phonegap.com/en/1.0.0/phonegap_file_file.md.html , look at the fileTransfer method.

On the Grails side, you need to expose a service or url that takes in incoming files. from the jquery/phonegap side u also pass in parameters indicating where the uploaded file be connected to. Once that is done it should be okay.