samedi 18 avril 2015

handle multiple image upload feature in php

I am using the basic version of the jquery plugin Jquery File Upload to allow users to upload multiple images. Backend server is in php. Here's how it works -



  1. When user adds an image, it is uploaded to the server (temporary location) and a url is sent back which can be used to delete the image.

  2. Users can fiddle around with the images, but unless they click 'Submit', it will not be saved. Upon submitting, I am moving these images to another defined location and saving the paths in the db.

  3. Whenever, the user album is retrieved again, I fetch all these images and display them


However, when the user edits the album, he can again fiddle around ( for instance deleting the img). But I cannot allow him to delete the image directly from the permanent location.


I have a feeling i'm overcomplicating things. How are scenarios like these handled ?


Aucun commentaire:

Enregistrer un commentaire