Asp.net mvc large file download

I use uploadify to upload files to an asp.net mvc application. Everything works fine, but when I try to download a file with 1 GB, for example, after you have added up to 100%, it just sits there for about 2 minutes.

I added a few registration codes, and this is what happens: when it reaches 100%, the controller action is triggered, I get HttpPostedFileBase, and then I call the .SaveAs file (path). Save As takes 2 minutes. The file is moved in the same section from the temp directory to the desired location.

Any ideas on why this takes so long?

Thank.

EDIT Moving a file manually occurs instantly. Copy paste file takes 5 minutes. The SaveAs method for this file took 1 m 30 s.

+3
source share
1 answer

I know this is not quite what you want :)

But I suggest you save the file in the same folder that you want, and name the file with temp_yourFileName Then, when you want to confirm that you simply rename it, this will reduce the work.

Again, I believe this should be the best solution for this :)

0
source

All Articles