Added restore endpoint to api - ref #1023

Also, names of submitted files are now stored in the database.

As always, if you see something weird, something that needs improvement, something that has to be tested properly, etc., please let me know :)