Questions tagged [httppostedfile]

51 questions
0
votes
1 answer

How can I convert a uploaded XML file that is in the form of a HttpPostedFIle to a string in C# asp.net?

How can I convert a uploaded XML file that is in the form of a HttpPostedFIle to a string in C# asp.net? I am trying to create the ability to upload an XML file and store it on a database server for a client that is using my web application. I need…
Jeffrey Padgett
  • 218
  • 1
  • 14
0
votes
1 answer

How to write file handling operations in class library project

UI MVC /*below method is called from a MVC controller this method resides for now in MVC project itself*/ public IEnumerable FetchJson(HttpPostedFile file) { …
Kgn-web
  • 7,047
  • 24
  • 95
  • 161
0
votes
1 answer

How to send HttpPostedFile to an action in some controller

If you want to send an object of type HttpPostedFile to an action, you may get null object in the action. So how to send it?
0
votes
0 answers

HttpPostedFile gets null

I have a FileUpload control and I am trying to upload an image to server with it but it fails. My view: And my c#: try { HttpPostedFile yuklenecekDosya = FileUploadImage.PostedFile; if…
0
votes
0 answers

The process cannot access the file '\image_o_6.jpg' because it is being used by another process

I have a scenario and I am stuck in it for 2 days . When i upload an image HttpPostedFileBase it saves successfully after that when I update it, it gives me the error of access denied my method is as follow: public void…
Waleed Baig
  • 422
  • 1
  • 6
  • 16
0
votes
2 answers

receiving xml file via http post

I have a test script to receive an xml file via http post and it appears to work ok when I use it internally. When I move the script to a web server which can be accessed externally nothing appears to be happening. Anyone any ideas?
thegunner
  • 6,883
  • 30
  • 94
  • 143
0
votes
0 answers

LocalFile cast as httppostedfile

I have a dll to which I have no source code. This has a method that accepts httppostedfile as an input. I wanted to pass a local file stream to this method. Is it possible somehow to convert the local file stream or bytes to httppostedfile format?…
pessi
  • 681
  • 1
  • 10
  • 26
0
votes
0 answers

How to get the Url of saved HttpPostedFileBase type file

I have saved the file using HttpPostedFileBase Type and now I am in a situation where I need to send an Email body which will contain Url of this saved file. So that user can directly click on this link and see what file has been uploaded. Right now…
Cijo V J
  • 261
  • 1
  • 3
  • 14
0
votes
2 answers

How to use file in file system for HttpPostedFile

I have the following code for creating PDF Thumbnails, but this code only works for input files with HttpPostedFile. But my files are in the file system an I don't know how to handle them without HttpPostedFile. How can I create thumbnails of files…
raven_977
  • 475
  • 2
  • 8
  • 25
0
votes
1 answer

Unable to submit form in IE9

I have the following code which is doing a javscript post using an XmlHttpRequest: var request = new XMLHttpRequest(); var postedFile = document.getElementById("file").files[0]; var formElement = document.getElementById("formID"); var form = new…
Jay
  • 3,012
  • 14
  • 48
  • 99
0
votes
1 answer

HttpPostedFileBase : Embedded statement cannot be a declaration or labeled statement

Using ASP .Net MVC 4 Razor. On my view page, I have HTML
I am using following scripts:
Abdur Rahim
  • 3,975
  • 14
  • 44
  • 83
0
votes
1 answer

Casting error with uploading files

I was working on my website when i noticed my foreach loop wasn't working to upload a list of files and a for loop did work. I am curious to find out why the for loop works and the foreaches loop aren't. The error message i got was: Cannot cast…
Jamie
  • 3,031
  • 5
  • 36
  • 59
0
votes
2 answers

Image content is same for different images uploaded

When I am trying to upload pics, same pic is getting uploaded with different name HttpFileCollection uploadedFiles = Request.Files; for (int i = 1; i < uploadedFiles.Count; i++) { HttpPostedFile…
Zerotoinfinity
  • 6,290
  • 32
  • 130
  • 206
0
votes
1 answer

How to get the unchecked checkbox values of JQGrid for each row when form submitted

I have a JQGrid with a checkbox column as shown below. Once I enter the required data in JqGrid, I do a form submit. From the http posted file I can read the values entered in each field for textboxes and dropdowns(all of these are required). But…
Naveen Reddy
  • 153
  • 3
  • 9
  • 24
0
votes
1 answer

MediaInfo not able to get details of uploaded file in the same manner it can when pointed to local file

I have been trying to get the durationstring of a piece of video content that has been uploaded to an MVC4 application using the MediaInfo.dll which I have added to the application as a reference. I am successfully able to view the details of the…
Jay
  • 3,012
  • 14
  • 48
  • 99