gigascience / gigadb-website

Source code for running GigaDB
http://gigadb.org
GNU General Public License v3.0
9 stars 15 forks source link

MUST Upgrade upload server Tusd from 0.13.1 to v2.2.2 #1628

Open rija opened 10 months ago

rija commented 10 months ago

user story

As an author I want to be notified of reasons if there is an error when I upload files So that I know what is going on when workflow hit a snag

Acceptance test criteria

Additional infos

File change to : fuw/tusd/hooks/pre-create

you should be able to used directly the example from the Tusd project: https://github.com/tus/tusd/blob/main/examples/hooks/file/pre-create

File to change to : fuw/tusd/hooks/post-finish

Look at the process-upload implementation in fuw/app/console/controllers/TusdController.php for return code (ExitCode::CANTCREAT, ExitCode::DATAERR and ExitCode::OK)

See examples at https://github.com/tus/tusd/tree/main/examples/hooks/file

use HTTP status from https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses

e.g:

ExitCode::OK -> 200 ExitCode::CANTCREAT -> 500 ExitCode::DATAERR -> 401

rija commented 8 months ago

TODO: there's a corresponding frontend ticket that need to be created for this