c# - WriteFile vs TransmitFile for large files that need to be deleted from the server after transfer -
I have to trigger user downloads of large files in the web browser, where I am creating a file to transfer to the server , Then remove it immediately afterwards i get enough examples that i probably should use the feedback. Transmission file or Response The Vir file ... but has problems with both:
The file is synchronous, but it buffer the file in memory before sending the user as I am working with very large files , So it can cause problems.
The transmit file does not buffer locally, so it works for large files, but it is asynchronous, so I can not remove the file later Calling transmit file clearly guarantees the file flushing Is not it that I can remove it either?
What is the best way to deal with this?
Here also there is binary ... I have to copy it into sections, through the loop file stream?
Here's a good solution that uses transmit files, but you
Simply replace the logging with the file removal at the end.
Comments
Post a Comment