transloadit / uppy

The next open source file uploader for web browsers :dog:
https://uppy.io
MIT License
29.02k stars 2k forks source link

Companion improvements #3284

Open mifi opened 2 years ago

mifi commented 2 years ago

Discovered while working on #3159:

Discovered while working on #3953

Moved from trello

Write tests:

Murderlon commented 2 years ago

Can we merge this issue into #3180? and perhaps the last point can go into #3268?

mifi commented 2 years ago

I think this issue is different from #3180. #3180 is about small breaking changes we want to do in the next major. This issue is more about non-breaking changes which would improve companion, but I didn't want to make an issue for each of the improvements, as we would end up with very many issues then. And I didn't find any other place they fit in, so I put them here.

I'll move the last point to #3268 đź‘Ť

Acconut commented 2 years ago

Regarding:

pause/resume tus upload does not work properly with streamingUpload: true (currently defaults to false), due to this issue: https://github.com/tus/tus-js-client/issues/275

The linked issue is now fixed in tus-js-client v3.0.0-0 (still a prerelease). tus-js-client is able to properly pause and resume even when the data source is an in-memory stream. Note that tus-js-client will create an in-memory buffer of the size defined in its chunkSize option.

Just wanted to let you know that the depending issue in tus-js-client is now resolved.

mifi commented 2 years ago

Great! From my testing it seems to be working nicely. Shall we make companion depend on v3.0.0-0 or do you want to release this as a v2 in tus-js-client?

Acconut commented 2 years ago

Uppy now uses tus-js-client v3. Is there anything else that needs to be done (in uppy or tus-js-client) for this issue here?

mifi commented 2 years ago

Not that I know of. AFAIK Tus supports uploading streams with unknown length so it should be good.