httppostedfilebase Questions

3

Solved

Model public partial class Assignment { public Assignment() { this.CourseAvailables = new HashSet<CourseAvailable>(); } public string AssignmentID { get; set; } public Nullable<Sys...

3

Solved

When a user uploads a jpg/gif/bmp image, I want this image to be converted to a png image and then converted to a base64 string. I've been trying to get this to work but I've hit a brick wall rea...
Alkane asked 25/6, 2013 at 10:18

1

I'm working on an ASP.NET MVC project in in C#, trying to get upload a document from a form to my database. I'm currently in my controller where I have imported the file as HttpPostedFileBase, and...
Nepean asked 7/9, 2017 at 17:54

2

Solved

public ActionResult Import(HttpPostedFileBase currencyConversionsFile) { string filename = "CurrencyConversion Upload_" + DateTime.Now.ToString("dd-MM-yyyy") + ".csv"; string folderPath = Serv...
Etsukoetta asked 24/3, 2015 at 7:24

2

Solved

I'm attempting to pass a file to my Controller as a HttpPostedFileBase so I can parse through the file and pass information back to the page. For example, I want to allow a user to import a vCard, ...
Cartilaginous asked 30/10, 2013 at 22:57

3

Solved

I am attempting to upload an image using MVC 6; however, I am not able to find the class HttpPostedFileBase. I have checked the GitHub and did not have any luck. Does anyone know the correct way to...
Geny asked 23/4, 2015 at 23:49

6

I'm trying to upload images to my application but it always returns null. I'm unable to find the issue here. Can you help me out? Here's my code. Model [Table("Slider")] public partial class Sl...
Runthrough asked 25/10, 2014 at 14:8

7

Solved

First, here is my code: private Shoe ProcessForm(Shoe shoe, HttpPostedFileBase image) { try { shoe.Slug = CMSHelper.SanitizeTitle(shoe.Name); shoe.LastModification = DateTime.Now; if ((image...
Wholesome asked 5/10, 2011 at 3:41

1

I have this properly posting the image and binding to the HttpPostedFileBase property on my view model, but when I put the same property in the view model's base class, it doesn't model bind the by...
Dysprosium asked 25/1, 2015 at 17:12

3

Solved

I want to test the following line of code: ... Bitmap uploadedPicture = Bitmap.FromStream(model.Picture.InputStream) as Bitmap; ... Picture is a property in my model type HttpPostedFileBase. So ...
Pasteup asked 25/3, 2013 at 18:31

1

Solved

I understand the relationship between HttpPostedFileBase and HttpPostedFileWrapper, in terms of the need for both of them (i.e. in unit testing/mocking). But why, when I put a breakpoint on the ret...
Wakerife asked 23/7, 2014 at 12:50

3

Solved

Good morning - I am attempting to save an HttpPostedFileBase (which will always be a simple CSV file) to a session variable like so: [HttpPost] public ActionResult Index(HttpPostedFileBase impor...
Schoonover asked 20/1, 2011 at 13:43

3

Solved

I have a controller like this: public ActionResult Upload (int id, HttpPostedFileBase uploadFile) { .... } How can I make sure that uploadFile is an image (jpg, png etc.) I have tried with usi...
Confectionery asked 25/8, 2012 at 7:37

2

Solved

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 I...
Unbridled asked 23/7, 2009 at 13:24

2

Goal: Upload / post CSV file w/ UTF-8 characters to an MVC action, read the the data and stick it in a database table. Problem: Only the plain text characters make it through. UTF-8 "special" ...
Belding asked 3/6, 2012 at 16:34

1

Solved

When I attempt to upload images to my MVC controller action and there is a validation error, I have to click through each of the buttons and find all of my files again. If I have a view that consi...
Lettering asked 13/9, 2012 at 21:13

4

Solved

In my controller I have, because I wanted to be able to fill out some details about the video and actually upload it, the Video class doesn't need the actual video because it's going to be passed t...
Ivanna asked 1/6, 2012 at 19:27

3

Background of the issue. EDIT 3 I can verify that this appears to be working again in Chrome 20. Thanks! TLDR Update EDIT 2 After even further mucking about this appears to be a bug in Chrome 19...
Ossian asked 17/5, 2012 at 22:30

2

Solved

Ok, I've been going at this for several hours and I simply cannot find the solution. I want to get some data from my user. So first, I use a controller to create a view which receives a Model: pu...

4

Solved

Is there any way to get posted files (<input type="file" />) to take part in model binding in ASP.NET MVC without manually looking at the request context in a custom model binder, and without...
1

© 2022 - 2024 — McMap. All rights reserved.