I display images that I want the user to be able to delete. I do this with an AJAX request.
Is it best practise to:
-
Pass just the ID of the image, use mysql to find what the filename of that record is, and then delete the file?
OR
- Pass the ID and the src of the image so I can just delete the image right away without looking it up?
One uses more bandwidth, the other more processing power.
Either way I need the ID because I have to do delete the record.
Aucun commentaire:
Enregistrer un commentaire