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

Temp files

2 Answers 198 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
vel
Top achievements
Rank 1
vel asked on 15 May 2017, 07:26 AM

Temp files are not getting cleared from App_Data folder. Below is the .aspx code

<telerik:RadAsyncUpload runat="server" ID="AsyncUpload1" HideFileInput="true" MultipleFileSelection="Automatic"
                                            AllowedFileExtensions=".tif,.tiff,.pdf" OnClientFileSelected="onFileSelected"
                                            OnClientFileUploadRemoved="onFileSelected" TemporaryFileExpiration="05:00:00">

Below is the C# code for reading the image bytes.

foreach (UploadedFile file in AsyncUpload1.UploadedFiles)
{

 using (MemoryStream ms = new MemoryStream())
    {
                file.InputStream.CopyTo(ms);

    }

}

2 Answers, 1 is accepted

Sort by
0
Jason
Top achievements
Rank 1
answered on 14 Nov 2017, 09:33 AM

I am also having this issue.

Even setting the TemporaryFileExpiration to 20 seconds (00:00:20), the temporary files are never cleared up?

Also, a test file 'RadUploadTestFile' is created which also persists until manually deleted.

0
Jason
Top achievements
Rank 1
answered on 14 Nov 2017, 09:44 AM

I have read that temporary files are deleted when SaveAs is called on uploaded file OR when expiration time is met.

Source: here

I am reading the file from InputStream so never call SaveAs,

I am not seeing the temporary files being automatically cleaned up.

I am on 2017 Q2 (2017.2.711.40), using IE 11.

Thanks

Tags
AsyncUpload
Asked by
vel
Top achievements
Rank 1
Answers by
Jason
Top achievements
Rank 1
Share this question
or