0

I have a file upload control, when users hit browse and select the file residing on their machine. After that I have a button which posts back to an action method and parses through the file and the populates a few fields in the model on the page. Then they hit the save button and It saves the files since I persist the file path in a hidden field. My problem is in my local development environment everything works fine. When I deploy it on a server, The code does not parse the file. Is it possible that the file is not being parsed because server cannot directly open and read a file which exists on users machine?

Thank you

1
  • 1
    Might want to check permissions. Commented Jun 22, 2012 at 19:44

1 Answer 1

1

Is it possible that the file is not being parsed because server cannot directly open and read a file which exists on users machine?

Exactly. If you want to save the file, save it during the first post. You can't just read up a file from the user's computer from a webpage.

Edit:

Check this answer about how to do file upload in MVC3: https://stackoverflow.com/a/5193851/618331

Sign up to request clarification or add additional context in comments.

1 Comment

Ahhh Ok, What I was doing was providing the parser the exact filename from the file upload input box

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.