Multi file upload

This is a pull request into sha256-custom branch.
I think that then you might not need a `currentDocument` variable anymore.