The question is somewhat vague, to answer properly maybe we need more information about your system and browser vendor/version. Mega uses some really cool stuff to handle downloads and files.
They use, depending of the client environment:
- Filesystem API (Chrome / Firefox Extension polyfill);
- Adobe Flash SWF Filewriter (fallback for old browsers);
- BlobBuilder (IE10/IE11);
- MEGA Firefox Extension (deprecated);
- Arraybuffer/Blob Memory Based;
- MediaSource (experimental streaming solution);
- IndexedDB blob based (Firefox 20+).
With all these methodologies, download directly without user intervention/authorization will rely on the browser compatibility. I am using Firefox on Linux, when I choose a file from Mega and click to download, a dialog box shows up so, in matter of effect, I have to authorize the download. But if you look to this screnshot, in the 'from' field you will see the word 'blob', thats a sign of a Blob object from the File API W3C Specification.
You can see a Blob API utilization example in this fiddle and inspecting Mega's source code (case 4: Arraybuffer/Blob Memory Based, lines 15, 293, 324, 802).
window.URL = window.URL || window.webkitURL;
var blobExample = new Blob(['\
<!doctype html>\n\
<html>\n\
<body>Hello from Blob file!</body>\n\
</html>'], {type: 'text/html'});
var blobLink = document.createElement('link');
blobLink.rel = 'html';
blobLink.href = window.URL.createObjectURL(blobExample);
document.body.appendChild(blobLink);
var anchor = document.createElement('a');
anchor.href = window.URL.createObjectURL(blobExample);
anchor.download = 'blob-example.html';
anchor.textContent = 'Download the binary large object';
document.body.appendChild(anchor);
=)