如何使用HTML 5实现文件上传/附件等Gmail [英] How to implement gmail like file upload/attachment using HTML 5
问题描述
我记得有些选项支持Ajax(无后发世界)文件上传,
$ b
- 隐藏iframe
- 使用flash对象(虽然我仍然对使用SWF的好奇心以及它提供的优点是什么?)
然而,通过查看博客,看起来HTML5是有前途的,我尝试了一些小例子,它确实有效:)
但是最近我发现 gmail使用了新的drap drop file功能HTML 5(不闪光)。
有人能指导我如何实现这一目标,以及我需要准备什么? HTML5中的XMLHTTP ...(Ajax对象)api有变化吗?
任何线程都会有帮助
感谢所有人,
我可能错了,但我认为只有帮助HTML5提供这种上传模式的是,它支持上传字段的多个属性。
这允许您从文件选择器对话框中选择多个文件,而不使用flash
。
上传本身仍然需要通过JS或PHP或[yourfavorite]来完成。一个好帮手可能是
http://code.google.com/p/jquery-html5-upload/
例如,。
I remember some options where Ajax like(No post back world) file upload was supported,
- Hidden iframe
- Using flash object (Though i still have curiosity of why SWF is used ? and what advantages it offer ?)
However by looking at blogs it appears that HTML 5 is promising, i tried some small examples and it really works :)
But recently i found that gmail has new drap drop file feature implemented using the HTML 5 (No flash). Can some one guide me how this can be achieved and what all i need to prepare ? Is there change in XMLHTTP...(Ajax object) api in HTML 5 ? Any threads will be helpful thanks all,
I could be wrong, but I think the only help that HTML5 gives for such an upload-pattern is that it supports the attribute 'multiple' for upload fields. This allows you to select multiple files from the file-chooser dialog without using flash . The uploading itself still has to be done by JS or PHP or [yourfavorite]. A nice helper could be
http://code.google.com/p/jquery-html5-upload/
for example.
这篇关于如何使用HTML 5实现文件上传/附件等Gmail的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!