Javascript upload

I would like to have a javascript on a webpage that is able to upload to a folder (set to allow anonymous uploads and password set). I would like the uploading to happen without user interaction.

The purpose of the page is on a site where the user is logged in. The press a button to record themselves, and then the recording (when finished) is automatically uploaded to teacher. Any help is appreciated.

Perhaps just use webdav (some randomly found links related to this topic):

I would be curious about this as well. I stumbled upon this.