Solved

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

Posted on 2010-11-10
2
1,445 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 500 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

760 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now