Create a new key before uploading a file

Avoid setting wrong metadata