Importing Project from GitLab Export validates file extension only after uploading the backup
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
I was trying to create a new project in a test instance by clicking at the "from GitLab Export" option. The compressed file was about 5 GB, and only after it has uploaded the entire thing I got a validation error saying that it "needs to be a .gz
file".
Proposal
It seems that file extension should be something we can validate earlier. I believe the extension is part of the initial multi-part header (not sure if we are relying on nginx here or not to receive this file, which if not, could be really useful to abort it earlier).
Alternative would be to implement https://tus.io/ protocol as both a way to improve the upload part (so we get people a feedback of how long it will take to upload that multiple Gigabyte backup), but also validate earlier if the file is in the right format, etc.
For a quick win however, we can add a note clarifying what file type needs to be uploaded. In the note, we could also mention the max file size, which currently is 5 GB.
We are currently interested in quick win only.