Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Mega downloads a file?

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.

like image 967
tuandhq Avatar asked Aug 25 '13 04:08

tuandhq


People also ask

What happens when you download files from MEGA?

When you download a file from the MEGA service, you are shown a pretty download progress bar within the browser. Once this progress bar reaches 100%, your browser then begins to download the file. That is, only once the graphical download is complete, your browser's normal download process is started.

How does MEGA work download?

Mega makes use of cryptography to boost the security of files instead of relying solely on HTTPS and server-side encryption. Uploaded data is encrypted before being transmitted via the web and is only decrypted once a download is complete.

Where do MEGA downloads save?

Downloaded data will be found in the internal storage of your device at 'Download' -> 'MEGA Downloads' folder. Long press on the file/folder inside the 'MEGA Downloads' folder and tap on the menu icon at the top right.

Does MEGA automatically download?

There are many different ways in which you can download files or folders from MEGA. Downloads can be started manually or automatically with MEGA's synchronisation features.


1 Answers

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].

like image 72
roberto Avatar answered Oct 01 '22 18:10

roberto