This is a migrated thread and some comments may be shown as answers.

Cannot delete uploaded file

5 Answers 77 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 2
Joe asked on 28 Oct 2008, 08:55 PM
Hi,
I'm using the latest radupload in 2008 Q2 (VB)

I'm uploading a single file, and using the FileExists functionality. Nothing spectacular going on and it uploads just fine.

The problem is once the file is uploaded, I cannot delete the file using Windows Explorer. I get (Cannot delete imagename: Access is denied. Make sure the disk is not full or write protected and that the file is not currently in use.) I am an administrator on the machine so it shouldn't be a permissions issue. I can delete other files without problems. Again, I'm deleting manually, not via .NET.

I think dispose() may need to be called at some point, but I'm not really doing much in the code-behind other than the following. Any help would be greatly appreciated...

Protected

Sub RadUpload1_FileExists(ByVal sender As Object, ByVal e As UploadedFileEventArgs) Handles RadUpload1.FileExists
lblMsg.ForeColor = Drawing.Color.Red
lblMsg.Text =
"Filename already exists! Filenames must be unique."
fileexists = True 'This variable is declared globally
End Sub

 

Protected Sub btnUpload_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnUpload.Click
If Not fileexists Then
Dim fname As String = RadUpload1.UploadedFiles.Item(0).GetName
lblMsg.ForeColor = Drawing.Color.Green
lblMsg.Text =
"Successfully Uploaded: " & fname
End If
End Sub

 

 

5 Answers, 1 is accepted

Sort by
0
Joe
Top achievements
Rank 2
answered on 31 Oct 2008, 03:14 PM
I ended up completely changing directions with this feature. So no solution... sniff sniff
0
Veselin Vasilev
Telerik team
answered on 31 Oct 2008, 03:18 PM
Hi Joe Hakooz,

When you try to delete the file - are you sure that the file is completely uploaded on the server? Do you have permissions to delete files from that folder?

I tried this locally, but could not manage to reproduce it.

Let us know the steps to reproduce it.

All the best,
Veselin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Joe
Top achievements
Rank 2
answered on 31 Oct 2008, 03:38 PM
Thanks for the response.

Unfortunately I could not resolve this so I changed the way I'm doing things. Basically, I am now uploading and deleting via code and it works just fine.

The problem may have been related to permissions on my server, but I'm an administrator and can delete any other files except the ones uploaded by RadUpload. And to answer your question, the files seemed to be completely uploaded. (JPGs and other small files.)

If I come across any more info or answers to my last problem I'll try to post them here....

Thanks
0
Erjan Gavalji
Telerik team
answered on 02 Nov 2008, 02:45 PM
Hi Joe,

Just a hint - you can use SysInternals Process Explorer to check if the file is locked by some process...

Regards,
Erjan Gavalji
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Joe
Top achievements
Rank 2
answered on 02 Nov 2008, 03:02 PM
That could come in handy. Thanks!
Tags
Upload (Obsolete)
Asked by
Joe
Top achievements
Rank 2
Answers by
Joe
Top achievements
Rank 2
Veselin Vasilev
Telerik team
Erjan Gavalji
Telerik team
Share this question
or