CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Stop Uploaded File Deletes

Print topic Send  topic

Author Message
Edd


Posts: 547
Posted: 08/12/2013, 11:33 PM

I have a situation where an uploaded file can be referenced by multiple records. When someone updates the file in a single records it deletes the existing file and adds the new one (as it should) - this results in broken links for all the other records.

Does anyone have a quick idea how to stop the delete of the file, I checked the "BeforeDeleteFile" event but it doesn't have a capacity to prevent the delete before it happens.

FYI CCS 4.3 and classic ASP.

Cheers Edd
_________________
Accepting and instigating change are life's challenges.

http://www.syntech.com.au
View profile  Send private message
ckroon

Posts: 869
Posted: 08/13/2013, 4:15 PM

I would make a function that runs after the upload is complete

update tablename SET filename = 'newfilename' WHERE filename = 'oldfilename'

_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
Edd


Posts: 547
Posted: 08/13/2013, 4:38 PM

Still does not prevent the old file from being deleted.

I didn't explain myself very well. I have the capacity to copy records, 99% of the time the uploaded image file remains the same across all these records so all is sweet. But occasionally I get a user who looks at a copied record and says I want to change ONLY THAT records image. When they upload a new image it automatically deletes the old image.

I don't care about orphaned images I just want the upload component to stop deleting the existing image.

I have a workaround involving backups prior to upload and restore after but I thought there might be an easier way.


_________________
Accepting and instigating change are life's challenges.

http://www.syntech.com.au
View profile  Send private message
JessicaRobort

Posts:
Posted: 09/19/2013, 4:13 AM

:)
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.