开发者

ASP.Net MVC 3 big file uploader with progress

开发者 https://www.devze.com 2023-04-10 04:13 出处:网络
I\'ve spent several hours of googling. Can anybody point me to an example of big file uploader with progress with backend on ASP.Net MVC3. I found many different solutions, but most of them use PHP as

I've spent several hours of googling. Can anybody point me to an example of big file uploader with progress with backend on ASP.Net MVC3. I found many different solutions, but most of them use PHP as backend, and it's a bit hard for me t开发者_JS百科o convert. Also I think there have to be some examples for ASP.Net MVC3.

PS I don't consider paid components, please don't suggest them.


Uploadify - there you have it :) Set maxRequestLength in the web.config

http://midnightprogrammer.net/post/Upload-Files-In-RAZOR-With-jQuery-Uploadify-Plugin.aspx


You could try out Telerik Upload not sure what the file size limit is though.

This is a free and opensource component from Telerik.


I spent a good amount of time getting the right plugin too.

I use this : http://valums.com/ajax-upload/

Uploadify uses flash to send files, which was bad for me as i needed upload from authenticated users ONLY. And flash would not send the cookies and so your application will treat the upload request as anonymous. If that is not an issue, uploadify works fine too.

Here is how i implemented it in mvc3 -

Create a controller / action to receive the opload file. Change the 'action' property of the plugin to point to it -

// url of the server-side upload script, should be on the same domain
action: '/controller/action'

Make sure that action returns JSON object with a property in it with 'success' = 'true'/'false'

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号