How Mega downloads a file?
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].
Admin
Updated on July 26, 2022Comments
-
Admin almost 2 years
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 completely 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.
-
Zhanger over 10 yearsThis guy is right. As you can see here, in Chrome 32, they use the
a[download]
attribute as he mentioned.