ASP.NET Load from stream (temp folder grows)

Hi.


In this moment Im developing an asp.net application that loads files from aws storage for viewing. So I download the demo project and implement it in my project.

The file comes in a memorystream but reading the documentation abount loading documents from stream, I can see that the viewer saves the document in a temp folder before showing it.

My question is: if viewer saves the file each time I need to show it, the temp folder is going to grow with no control, makin my web site has a lot of garbage.

Please I would appreciate your help in it.

Thanks.

Hello,

Thank you for your interest in GroupDocs.Viewer. Yes, you are absolutely right, GroupDocs.Viewer “materializes” document from the stream into the temp file, this is described in the article “How to Use GroupDocs.Viewer with Streams in ASP.NET MVC or WebForms Projects”. This is done in order to perform caching and to prevent the situations, when stream is not available (disposed, changed etc.) but is still required by the GroupDocs.Viewer.

If you are confident that temporary files are not useful and want to clear the cache, you can use the “DocumentCache.RemoveOldEntries” instance method, which is described in the article “Description of GroupDocs Viewer DocumentCache class”.

If you will have more questions please feel free to contact us.

It will not deleted temporary files practically . Plz suggest me if any options available