UploadForm - Erase Old Upload when Adding New One

4 posts by 3 authors in: Forums > CMS Builder
Last Post: February 2, 2015   (RSS)

By claire - January 30, 2015

Hi Perch

If you need to just get the most recent upload, that's easy enough to do in code. What exactly do you need?

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

Claire Ryan
interactivetools.com

Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By Perchpole - January 30, 2015

Hi, Claire

There are a couple of instances when it would be simpler to be dealing with just one image at a time. An example would be a user's profile pic. When they upload a new photo the old image should be deleted automatically.

How could I add this functionlaity to the UploadForm3 script which is available on this site?

Thanks,

Perch

By Dave - February 2, 2015

Hi Perch, 

It's possible to do that with custom code.  But from a usability point of view I would advise again ever erasing user data without them explicitly confirming that's what they want to do.

Otherwise you're going to end up with support messages from users who "tried" a new image only to have their old image automatically erased and now they can't find it and want it back.  I say that because we see the end-user feedback and situations like that are pretty common.  

One alternative would be to only show the "newest" upload as their profile pic.  So uploading a new image replaces the old one, but erasing the new one brings back the new one.  Kind of like how facebook keeps a history of your facebook profile pics.

Another would be to show them a message that advises them they need to erase the old image first.

So there's some ideas.  If you still want to auto-erase after that let me know and I'll see if I can get you some simple code to do it on UploadForm3.

Hope that helps!

Dave Edis - Senior Developer
interactivetools.com