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, etc., please let me know :)