Questions tagged [asp.net-mvc-file-upload]

7 questions
49
votes
2 answers

How do you convert a HttpPostedFileBase to an Image?

I am using ASP.NET MVC and I've an action that uploads the file. The file is being uploaded properly. But I want width and height of the image. I think I need to convert the HttpPostedFileBase to Image first and then proceed. How do I do that? And…
Abdulsattar Mohammed
  • 8,916
  • 12
  • 49
  • 66
4
votes
1 answer

How to serialize HttpPostedFileBase object to json

I have a method in a controller named 'Upload' with a parameter HttpPostedFileBase object, I posted the file from view and saved it to folder successfully. But When I try to return a JSON string object with below contents, it throws an exception…
TyForHelpDude
  • 4,032
  • 8
  • 41
  • 76
3
votes
1 answer

Uploading Multiple Files - MVC..is there a total file size limit?

I have a form from which users can add a property listing. Apart from the data that the user has to enter, the user can also upload a number of images. I'm using the HTML5 multiple attribute to allow users to upload more than one file at once. For…
Daniel Grima
  • 2,396
  • 5
  • 29
  • 53
2
votes
1 answer

File is empty and I don't understand why. Asp.net mvc FileResult

I am trying to use the built in asp.net file result to return a file that I am trying to make through a file stream. I am using Dday.ical to make my calendar for export MemoryStream export = new MemoryStream(); iCalendarSerializer…
chobo2
  • 75,304
  • 170
  • 472
  • 780
2
votes
1 answer

How to associate entities generated by separate forms... while not having access to the code of one

Ok, so I am attempting to implement the typical image-upload capability in my website. (I never expected it to be so complicated!!!) I finally found an AWESOME nuget package (MvcFileUploader) that uses the jQuery-File-Upload plugin. It works…
0
votes
1 answer

Excel file reading in mvc5 using javascript function

The Excel sheet want to read while it upload on a button click in MVC5.The uploaded excel file name is passed into action using AJAX method.Here the file variable get null value in posted method. Here how can pass selected file as HttpPostedFileBase…
0
votes
1 answer

IIS 7.5 Max Concurrent requests per system

I hosted an ASP.NET MVC5 web application on a windows server 2008 R2 SP1. in this website there is a upload file section which users can upload large files with max size of 1 GB. When they click on upload button another popup window will be opened…