ASP.NET上传的背景文件(位/ AJAX?) [英] ASP.NET Uploading files in the background (BITS/AJAX?)

查看:231
本文介绍了ASP.NET上传的背景文件(位/ AJAX?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网页,用户可以创建一个数据库记录,并选择要上传到数据库服务器上的文件。这些文件可大了,像100MB。

I have a webpage where users can create a database record and select a file they want to upload to the database server. these files can be big, like 100mb.

我不希望用户等待,所以我想要的文件在后台上传。让他们可以继续做其他的东西,而该文件被上传。

I dont want the user to wait, so I want the file to be uploaded in the background. So that they can continue with doing other stuff while the file is being uploaded.

时位的路要走呢?或者是,只为Fatclient发展?任何好的tuterials ?

Is BITS the way to go for this? Or is that only for Fatclient development? Any good tuterials ?

如果BITS是不是要走的路,我有哪些选择?与filelocation一个AJAX调用一个服务?

If BITS is not the way to go, what are my options? An ajax call to a services with the filelocation?

推荐答案

如果你说:他们可以继续做其他的东西,意味着他们可以做同样的网页上的其它Ajax请求(即不导航离开从它),你可以与任何基于Flash的上传做到这一点( SWFUpload的是的很多)。这并不需要什么,但一些JavaScript,一个<输入类型=文件> 和嵌入式Flash上​​传

If you, by saying "they can continue with doing other stuff", mean that they can do other Ajax requests on the same web page (i.e. not navigating away from it), you can accomplish this with any Flash-based uploader (SWFUpload is one of many). This doesn't require anything but some JavaScript, an <input type="file"> and the embedded Flash uploader.

如果您希望用户能够导航离开该页面启动上载,你不能真正做到这一点的浏览器中,至少直到的的WebSockets 在所有浏览器得到充分实施。即使是这样,这将是十分困难的。

If you want the user to be able to navigate away from the page initiating the upload, you can't really do it within the browser, at least not until WebSockets are fully implemented in all browsers. Even then, it's going to be quite hard.

这篇关于ASP.NET上传的背景文件(位/ AJAX?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆