Adding files is impossible if the task hasn't been saved
Closed this issue · 3 comments
At the moment of the creation of a task, there is a tab where the system ask the user for files to upload. However, the task folder is not present unless we click "save changes" and the logic of creation of the file requires that the folder is already present. This result is that the user cannot upload the file because the folder is not there
We can automatically create the task folder when the user tries to upload a file. However, I wonder if this is actually the right thing to do. Consider the scenario where the user uploads a file but ends up not saving the task. What should happen in this case? Because we don't have a way to know if this will happen (the user can just close the window), and we will have the directory structure of a task, but the task won't be valid (e.g it won't have the task.yaml file).
This is the problem of the way the INGInious team designed the file upload. As they do it separately from the rest of the task form, you end up with scenarios like this.
I would suggest just showing a more meaningful message when the user tries to upload a file but has not created the task yet. We could just tell the user that he must create the task first.
So, we have a trade-off between potential unused task contaminating our folder and friction at the moment of creating the task. Taking into account the complexity and consequences of the first one. I agree with you that we could show a better error message than "invalid path"
This is already fixed, right? I'm closing this