'How exactly is a file processed in memory before and during a browser file upload?

Say you drop a file from your desktop into a droparea of some Website/App executed in your browser and then hit the upload button, what read, write, copy operations happen in memory, whos memory?

Is there a memory address from the web app that points to an address of the browser that points to an address from your local file system? Is the file copied to your browsers memory entirely before or during upload? Or perhaps all the browser really does is access an API exposed by the platform OS and the OS actually takes care of everything without anything being read,written or copied by the browser at all?

How exactly does this work? Thanks :)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source