简体   繁体   English

Ajax文件上传器

[英]Ajax File uploader

I just wanted to ask a question about uploading files via AJAX. 我只是想问一个有关通过AJAX上传文件的问题。 I have researched on the web and found many articles on doing this. 我在网上进行了研究,并发现了许多有关此操作的文章。 I am using ASP.NET 2.0. 我正在使用ASP.NET 2.0。

I am probably going to go the jQuery route on this one, but I'm still unsure, I just need some feedback. 我可能会在这条路线上走jQuery,但是我仍然不确定,我只需要一些反馈即可。 Bacause my aim is to create an admin page for my client to add new products to his site when my client wishes to, so my client wants a simple file uploader and a multiple file uploader. 因为我的目标是为客户创建一个管理页面,以便在客户希望的时候将新产品添加到他的站点,所以我的客户希望有一个简单的文件上传器和一个多文件上传器。

The first question is which is the best AJAX File Uploader to use? 第一个问题是使用哪种最佳AJAX文件上传器?

The second question is how many files can you upload via AjAX, are there limits to how much you upload with different techniques ie. 第二个问题是您可以通过AjAX上传多少个文件,使用不同的技术(例如,)可以上传多少个文件? using jQuery or SWFUpload or using IHTTPHandler? 使用jQuery或SWFUpload还是使用IHTTPHandler?

I would be grateful for your feedback. 谢谢您的反馈。

Thanks. 谢谢。

I actually had to do this for an item here at work. 实际上,我必须为这里工作的某个项目执行此操作。 To keep things rather simple, I went old-school and used a hidden iframe to do the file transfer in the background. 为了使事情变得简单,我上了老派,并使用了一个隐藏的iframe在后台进行文件传输。 There may be more fancy ways, but this worked for me. 也许还有更多花哨的方法,但这对我有用。 Also, there's no headaches when Adobe pushes out a bad update. 此外,当Adobe推出错误的更新时,也不会感到头疼。

It was a while ago, so I can't remember the nuts n' bolts of the top of my head, but here's an article that seems to be using the same idea: 不久前,所以我记不住脑袋顶部的螺母了,但是这里的一篇文章似乎使用了相同的想法:

http://www.openjs.com/articles/ajax/ajax_file_upload/ http://www.openjs.com/articles/ajax/ajax_file_upload/

This is a subjective question , as there is no one solution fits all for your application. 这是一个subjective question ,因为没有一种解决方案适合您的应用程序。 The right answer is the uploader that meets your business needs. 正确的答案是可以满足您业务需求的上传器。 Limitations, if they exist, are set per whatever component you decide to use. 如果存在限制,则会根据您决定使用的任何组件进行设置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM