in the docs we have:
Upload a new file or overwrite an existing one. Returns status code 200 if the file has been added/updated successfully. The file content should be sent as the request body.
but if I try to update an existing file, I get an error:
HTTP/1.1 500 Internal Server Error.
MongoError: E11000 duplicate key error collection
I think this is a bug and the intended behavior is to overwrite the file in the database + updating metadata and maybe reply with a 200 OK, to distinguish between a file created and file updated (on new file it returns 201 Created).