Pure ASP Upload 3 Support Product Page
Answered
Delete file not working
Asked 18 Dec 2012 19:46:49
1
has this question
18 Dec 2012 19:46:49 Alejandro Mucino posted:
I added the behavior to delete the file before the record, here is my code:<% ' *** Delete File Before Delete Record 1.8.2 If (CStr(Request("MM_delete")) <> "" And CStr(Request("MM_recordId")) <> "") Then Dim DF_filesStr, DF_path, DF_suffix DF_filesStr = "storage_name" DF_path = "Session(\'Attachmentsfull\')" DF_suffix = "" DeleteFileBeforeRecord DF_filesStr,DF_path,MM_eimmigration_STRING,"dbo.Attachments","attachment_id",Request.Form("MM_recordId"),DF_suffix end if %>
The session is an absolute path, the database recod is deleted but not the actual file in the folder.
What may be wrong ?
I double checked and 'storage_name' is the exact name of the file in the folder.
and the absolute path to the file in the folder is: Session("Attachmentsfull"
Replies
Replied 08 Feb 2013 11:34:46
08 Feb 2013 11:34:46 Miroslav Zografski replied:
Hello Alejandro,
this line:
Must look like this instead:
Please, give it a try.
Regards.
this line:
DF_path = "Session(\'Attachmentsfull\')"
Must look like this instead:
DF_path = Session("Attachmentsfull")
Please, give it a try.
Regards.