John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

Photo just taken, how to add to a photo album?

well, I wanted to make sure that the pic(s) are actually successfully stored in local storage, because my next task i want to work on is to send the pics to my server and I want to make sure that will not be any issue. So, even if its a long string, how I would i read it? And It would have to be from my iPhone or Android since Im taking pics from the phone..?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Photo just taken, how to add to a photo album?

Lets begin with implementing the codes described above :)

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

Photo just taken, how to add to a photo album?

my back end guy wants to know can we save them pics as normal image files instead of a byte stream? I'm using amazon web services and the way he wrote the code to receive the pics as multi-part files or he wants the front end to send the image files as a multi-part request? I even looked at your basic REST services and dont see that kind there...??

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

Photo just taken, how to add to a photo album?

Regarding the photoswiping question, i found i think a plugin from:

http://www.photoswipe.com

Im able to download a zip file, and they give me these instructions:

----------------------------------------------------------

What to include:

The call:

// Set up PhotoSwipe with all anchor tags in the Gallery container
document.addEventListener('DOMContentLoaded', function(){

var myPhotoSwipe = Code.PhotoSwipe.attach( window.document.querySelectorAll('#Gallery a'), { enableMouseWheel: false , enableKeyboard: false } );

}, false);

----------------------------------------------------------------

For the way I'm taking pics (above), how would I implement the zip file, 'What to include:', and 'The Call' from http://www.photoswipe.com ??

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

Photo just taken, how to add to a photo album?

BTW: theres two script lines after 'What to include:' - I guess its only visible when you click 'edit' for this comment

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

Photo just taken, how to add to a photo album?

I will try working on this with my back end guy in a little bit.

Emmz
Posts: 0
Joined: Sat Jun 23, 2012 11:06 pm

Photo just taken, how to add to a photo album?

Sorry.. have to chime in here...
Storing pictures in LocalStorage is a bad idea. The pic is already stored on the phone and is accessible via simple phonegap functions as well as uploading to the server.
Localstorage size restrictions being the important issue here as well. A couple of pics and it will be full...

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

Photo just taken, how to add to a photo album?

ok Neil I see your point. There was no real good reason for local storage (at least not for this feature).

So, how would i be able to set up a service then to send the image files as multi-part (where-ever they are normally stored) with some other request parameters (just text - like 'id') to my server?

Emmz
Posts: 0
Joined: Sat Jun 23, 2012 11:06 pm

Photo just taken, how to add to a photo album?

Sending pics via Jquery is very difficult. Not sure it can even be done with img_uri type.
Phone gap has a great file upload that works great! I have implemented it to upload users taken pics to php server.
Whats your server running?

Return to “Issues”