Don't discard the filename when uploading a file
Support uploading files both from curl and the web interface
Add initial support for mimetypes by extension
Also support filename extensions when recovering

And cache paths in memory