最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How Mega downloads a file? - Stack Overflow

programmeradmin2浏览0评论

when you download a file from MEGA service, a web page to display a download progress bar will appear. After the bar reaches 100%, your browser will notify users to save the file into a selected folder. I know that Mega use HTML5 FileSystem API to do this (Download files like mega.co.nz ). However, i don't know when the file is pletely downloaded into the sandboxed directory, how the browser's instructed to notify users about the download? Would you please answer my question? Thanks in advance.

when you download a file from MEGA service, a web page to display a download progress bar will appear. After the bar reaches 100%, your browser will notify users to save the file into a selected folder. I know that Mega use HTML5 FileSystem API to do this (Download files like mega.co.nz ). However, i don't know when the file is pletely downloaded into the sandboxed directory, how the browser's instructed to notify users about the download? Would you please answer my question? Thanks in advance.

Share Improve this question edited May 23, 2017 at 12:24 CommunityBot 11 silver badge asked Aug 25, 2013 at 4:54 tuandhqtuandhq 991 gold badge1 silver badge2 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 7

By using either a[download], msSaveOrOpenBlob, or Adobe Flash SWF Filewriter, depending on which method is supported by the browser.

PS: MEGA doesn't always use HTML5 FileSystem API. They have various techniques that they use depending on the browser support. In Firefox 20+, for example, they will store the data temporarily to the IndexedDB storage, before triggering the a[download].

发布评论

评论列表(0)

  1. 暂无评论