Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
151
rated 0 times [  157] [ 6]  / answers: 1 / hits: 78154  / 11 Years ago, sun, april 14, 2013, 12:00:00

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?


More From » flash

 Answers
80

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)


[#78927] Friday, April 12, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
devonw

Total Points: 311
Total Questions: 116
Total Answers: 111

Location: Senegal
Member since Fri, Aug 21, 2020
4 Years ago
;