Temp files

3 posts, 0 answers
  1. vel
    vel avatar
    5 posts
    Member since:
    Oct 2006

    Posted 15 May 2017 Link to this post

    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. Jason
    Jason avatar
    9 posts
    Member since:
    Aug 2017

    Posted 14 Nov 2017 Link to this post

    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.

  3. Jason
    Jason avatar
    9 posts
    Member since:
    Aug 2017

    Posted 14 Nov 2017 in reply to Jason Link to this post

    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

Back to Top