ASP.Net MVC 3 大文件上传器有进展

发布于 2024-12-07 07:50:10 字数 167 浏览 5 评论 0原文

我花了几个小时谷歌搜索。任何人都可以向我指出一个大文件上传器的示例,该示例在 ASP.Net MVC3 上具有后端进展。我找到了很多不同的解决方案,但大多数都使用 PHP 作为后端,这对我来说有点难以转换。另外我认为必须有一些 ASP.Net MVC3 的示例。

PS我不考虑付费组件,请不要推荐它们。

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 to 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

红尘作伴 2024-12-14 07:50:10

上传 - 你就有了:)
在 web.config 中设置 maxRequestLength

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

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

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

℡Ms空城旧梦 2024-12-14 07:50:10

您可以尝试Telerik Upload,但不确定文件大小限制是多少。

这是来自 Telerik 的免费开源组件。

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

This is a free and opensource component from Telerik.

清风无影 2024-12-14 07:50:10

我也花了很多时间来获取正确的插件。

我用这个:
http://valums.com/ajax-upload/

Uploadify 使用 flash 发送文件,这很糟糕对我来说,因为我只需要从经过身份验证的用户上传。 Flash 不会发送 cookie,因此您的应用程序会将上传请求视为匿名。如果这不是问题,uploadify 也可以正常工作。

这是我在 mvc3 中实现它的方法 -

创建一个控制器/操作来接收 opload 文件。
更改插件的“action”属性以指向它 -

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

确保操作返回 JSON 对象,其中包含“success”=“true”/“false”的属性

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'

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文