Flash in Gmail File Upload Progress Bar

匿名 (未验证) 提交于 2019-12-03 08:50:26

问题:

Several resources I have found claim, that GMail File Upload incorporates Flash to display progress bar or to allow multiple file uploads.

For example:

My question is, it true, that GMail uses Flash to generate upload Progress Bar? If not, how does GMail achieve Progress Bars in IE9, which does not support FileAPI? I did several tests, and I was not able to confirm presence of Flash during GMail File Upload process:

  • I installed FlashBlocker which was blocking Flash content effectively. However, GMail File Upload progress Bar was not blocked.
  • I right clicked on the Progress Bar to see if it is Flash applet, but no it is not.
  • I checked source code, but I did not find any reference to .swf code.

So how does the GMail imlement its File Upload, which is displayed in all the browsers including IE9?

Any idea, please, if another developers can achieve the same results, or if the File Upload Progress Bar is Google specific?

I know there are many plugins available for Google Upload, but I wish to have clean JavaScript, HTML5, PHP, CSS3 and compatibility with IE9. I am therefore willing to code all the code on my own, if I understand the subject.

I use the following tools:

  • Javascript
  • HTML5
  • PHP
  • MySQL
  • CSS3

Thank you.


Update:

It really looks that GMail uses Flash to calculate Progress percentage when uploading a file. It than uses CSS to generate progress bar, therefore no Flash applet is used to display the Progress Bar.

I discovered this by disabling Flash in IE9. In contrast to Chrome, Flash can be easily disabled in IE 9.

Please, if you have anything to add to this topic, I will gladly discuss. For example, it would be interesting to know, how Flash applet can generate file upload progress percentage, and how it than can communicate that information with JavaScript or CSS.

回答1:

I have further explored, and I have to confirm, YES, still today, GMail must use several Flash objects that support file/attachment upload.

It is difficult to disable Flash in Chrome. However, it can be disabled in IE. After disabling flash in IE, GMail has switched to another, less interactive upload system without progress bars.

This is a clear proof of that GMail still uses Flash to support its upload routines.



回答2:

Google switched to HTML5 multi-file uploads about 2 years ago. I think they use fallback flash uploaders. http://www.webmonkey.com/2010/04/google-turns-to-html5-for-gmails-new-drag-and-drop-attachments/

This Library (jQuery File-Upload - Demo here: http://blueimp.github.com/jQuery-File-Upload/) claims that it can use the File Progress of Internet Explorer (at least some way ;-)):

All versions of Internet Explorer will also update the global progress bar after each iframe based upload. However since IE does not report the file size, the global progress bar will measure each uploaded file the same without regard to the size of the uploaded file. https://github.com/blueimp/jQuery-File-Upload/wiki/Browser-support



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!