Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

MVC2: How do I use a HttpPostedFileWrapper to save the file?

Posted on 2010-11-10
2
Medium Priority
?
1,541 Views
Last Modified: 2012-05-10
I see how to use the HttpPostedFileWrapper when allowing the user to upload a file. So now I need to use the HttpPostedFileWrapper for that file to save that file to disk on the server.

I do not need to parse the file and read it's contents in any way. I simply need to write it to a different location on the server.

How do I do that?

Thanks,
newbieweb
0
Comment
Question by:newbieweb
2 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 2000 total points
ID: 34102168
You should be able to just call the SaveAs() method of the wrapper, passing it a path and name to save to.
0
 

Author Closing Comment

by:newbieweb
ID: 34105354
Thanks.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question