问题描述
今天我查看了 mega.co.nz,我对某些功能感到很兴奋.例如在下载页面,它会在浏览器上下载文件,然后用 javascript 解密它们.
例如,请参阅此链接以下载 png 文件:
https://mega.co.nz/#!7JRgFJzJ!efpJGWuPhYx4dRxYdGw14sR_DG4JXddeClH4 在此链接中,它将在浏览器中开始下载.我检查了检查元素中的网络选项卡,它会在完成文件的所有部分后使用 AJAX 下载部分文件,并将所有这些部分自动保存在计算机上的一个文件中! 我想知道他们是做什么的?你能解释一下或链接到一些关于在浏览器中下载文件的资源吗? 也可以只用javascript来完成还是应该使用一些flash插件或类似的东西? Mega 使用几种不同的方法来做到这一点:(截至 2013 年 11 月 27 日) (来源:https://eu.static.mega.co.nz/js/download_6.js) 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? Mega uses several different methods to do this: (as of 27 Nov 2013) (source: https://eu.static.mega.co.nz/js/download_6.js) 这篇关于下载诸如 mega.co.nz 之类的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!