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 |
|
|
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. |
|
|
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 |
|
|
JessicaRobort
Posts:
|
Posted: 09/19/2013, 4:13 AM |
|
:)
|
|
|