Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Download files like mega.co.nz

Today I checked mega.co.nz and I'm excited about some features. For example in download page it will download files on browser and after that decrypt them with javascript.

for example see this link to download a png file :

https://mega.co.nz/#!7JRgFJzJ!efpJGWuPhYczLexY19ex82nuwfs4sR_DG4JXddeClH4

in this link it will start the download inside the browser. i checked network tab in inspect element it will download parts of file with AJAX after that completed all parts of file, will save all of them in one file on computer automatically!

i want to know what they do? can you explain or link to some resource about download files inside browser like that?

also can done it only with javascript or should use some flash plugins or something like that?

like image 915
Amir Molaa Avatar asked Apr 14 '13 00:04

Amir Molaa


People also ask

How do I bypass Mega download limit NZ?

To bypass the daily download limit for Mega, you must enter your proxy details. Otherwise, you will not be able to download files larger than 5GB. To get proxy details, go to any free proxy list site.

How can I download large Mega files for free?

Using Mega application and login, You can download very large files from mega. If you stocked after limitation definitions rules on mega. You can upgrade your account or wait for time until it is unblock barrier to download. Sometime Mega can take 24 hours to continue its download for exceeding size.

How can I view Mega files without downloading?

You can use the MEGA mobile app to stream video files on your device directly from your MEGA account. Simply tap on the video file and the play back will start automatically.


1 Answers

Mega uses several different methods to do this: (as of 27 Nov 2013)

  1. Filesystem API (Chrome/Firefox Extension polyfill)
  2. Adobe Flash SWF Filewriter (old browsers fallback)
  3. BlobBuilder (IE10/IE11)
  4. MEGA Firefox Extension (deprecated)
  5. Arraybuffer/Blob (in memory) + a[download] (for browsers that support a[download])
  6. MediaSource (experimental streaming solution)
  7. Blob stored in IndexedDB storage + a[download] (Firefox 20+, improvement over the in-memory Blob method)

(source: https://eu.static.mega.co.nz/js/download_6.js)

like image 112
roberto Avatar answered Oct 06 '22 00:10

roberto