Part of the bigger request #18391 Migrate Tracker Artifact Modal out of AngularJS
In the Artifact Modal, the current file upload mechanism is based on readable-stream, the NodeJS streams ported for the browser. It is combined with a REST route to upload file chunks to a temporary file. Following story #12964, we now have another endpoint compliant with the tus protocol to attach files on artifacts. While the current mechanism works well, it is painful to build because we have to pull several more things from the NodeJS world, such as Buffer
and process
.
If we can replace the streams by a Tus client, we could drop those dependencies. It would make the modal build easier. It could maybe produce a lighter bundle as readable-stream
alone weighs about ~100KiB. Additionally, we could stop worrying about file quotas and chunk sizes, so it would be one fewer fetch
request when starting the modal.