•  
      request #28830 replace File upload streams by TUS client
    Infos
    #28830
    Joris MASSON (jmasson)
    2022-09-20 09:31
    2022-09-15 10:00
    30403
    Details
    replace File upload streams by TUS client

    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.

    Trackers
    Empty
    Empty
    • [ ] enhancement
    • [x] internal improvement
    Empty
    Stage
    Joris MASSON (jmasson)
    Closed
    2022-09-20
    Attachments
    Empty
    References

    Follow-ups