Solved

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

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

867 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

20 Experts available now in Live!

Get 1:1 Help Now