Relative Content

Tag Archive for javascriptphpcachingfile-uploadbrowser-cache

How to save input=file submitted files in cache to display them in browser and only upload after a few steps (javascript/php)

I’m creating a file upload/edit tool for a photography company where the users should be able to upload multiple photos, view them, select some options for each of them, then go to the shopping cart and pay for their order. I want to only actually upload the photos to the server after they’ve submitted the shopping cart, so that’s a few steps later. I also want them to be able to go back to the editing page and see the photos they upload and change the options before going back to the shopping cart. I’d like to save the photos in cookies or in the php $_SESSION variable or somewhere else so that I can still access them after the page has been refreshed or the user has navigated somewhere else on the site.
I’m using JavaScript and PHP