close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

automatically overwrite old file

Thread began 6/08/2010 11:32 am by anstara245021 | Last modified 6/09/2010 11:57 am by Jimmy Wu | 1374 views | 5 replies |

anstara245021

automatically overwrite old file

Hi there.
I use update record and file upload to update a database record and a related image, but when I do so, the record and the new file are updated correctly but old images are still in the folder.
Is it possible to update images and at the same time delete old files ? I mean, literally overwrite old files.
In ADDT it was the default behaviour.

Sign in to reply to this post

Jimmy Wu

You will have to set up a delete file server behavior to do this after the upload is successful. There is no automated way to set up behavior like this.

Sign in to reply to this post

anstara245021

Thanks for answering.

So, after a successful upload I should set up a delete behaviour, but I don't understand how that can be possible. I mean, after updating the record with the new file name, how can I tell the delete file behaviour to delete the file whose name was in the record before the update ?

Sign in to reply to this post

Jimmy Wu

You would want to store the name of the file that was previously in the recordset in a session variable before inserting and updating the record.

Sign in to reply to this post

anstara245021

Well... I think I managed it...

I simply applied a delete file behaviour and chose as file to be deleted the one I previously set up as default file in the upload file behaviour. I don't know if this is the right way to do but it seems to work the way I needed.

Sign in to reply to this post

Jimmy Wu

Great to hear it. That is definitely a way to get the correct file deleted as well. If you run into any additional issues, feel free to open a new thread.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...