views:

33

answers:

2

I want to have file upload possibilites on my MVC site, and I have that no problem with the input field type="file". But the problem is, the browser decides how this field should look, and that ruins the look and feel of the page.

So my question is, if I want to have icons/images for download and upload and so on instead of the default button that is created by the input type="file" field, is that possible?

A: 

Is silverlight out of the question?

http://slfileupload.codeplex.com/

The reason I suggest this is because your options are very limited with the file input field. For obvious (I'd hope) security reasons, it is immune to being scripted or otherwise automated and is only visually customizable in very basic ways.

-Oisin

x0n
Well, maybe not out of the question, but I was hoping to be able to stick to asp.net and jquery. But I'll check it out!
Anders Svensson
Well I guess I have to look into this, because I can't find any other way, and the swfupload I can't get to work. Hope this will be an easier solution then... Thanks.
Anders Svensson
A: 

There are a ton of javascript + flash combination uploaders that can replace the button and add other goodies like progress bar, file type and size checking, etc. SWFUpload and jQuery Uploadify are two of the more popular ones and are pretty easy to implement.

Malevolence
Ok, yes, I tried an implementation of swfupload by Steve Sanderson,for MVC, which I'm using. But I got some error 302 and gave up. I don't know why, perhaps because I already had another jquery script and there was some conflict, I couldn't figure it out. But I could try another one. Can you style the interface (button etc)? Because I want it to integrate with the rest of the interface...
Anders Svensson

related questions