-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resumable video uploads #3933
Resumable video uploads #3933
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kontrollanten thanks for taking care of this issue! I didn't review much the backend, but will check more thoroughly once the PR leaves its draft state.
client/src/app/+videos/+video-edit/video-add-components/video-upload.component.html
Outdated
Show resolved
Hide resolved
client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts
Outdated
Show resolved
Hide resolved
@kontrollanten btw if you need help for the implementation (like tests or tmp cleanup as job), I can give you a hand. |
Thanks. I'm thinking about what the best solution is for the server tests that are using the |
It seems node-uploadx has been updated with the required changes to further this PR: https://github.com/kukhariev/node-uploadx/releases/tag/v4.3.0 |
client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts
Outdated
Show resolved
Hide resolved
client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts
Outdated
Show resolved
Hide resolved
44c1187
to
4082bc0
Compare
PR changed sufficiently to require a re-evaluation
@kontrollanten I rebased and moved your code to |
Thanks @rigelk ! What do we got left to be able to merge this? Tests and a cleanup job for /tmp? If you haven't started on the cleanup job I think I can do that. I that it should be a repeat job that runs once an hour. |
Yes, and I'd like to cleanup the object passing (file, metadata) which is brittle at the moment. Having well-typed object passing there is important, and especially regarding the plugin hook which receives the object. As for tests, we need to try not as much as the legacy upload, but at least the audio-only resumable upload, which is handled very differently from the rest within the middleware. |
client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts
Outdated
Show resolved
Hide resolved
It looks like the cleanup job fails to run in the tests, but I've no idea how to debug. |
1952fa1
to
c2ddc93
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
server/lib/job-queue/handlers/video-upload-tmp-folder-cleaner.ts
Outdated
Show resolved
Hide resolved
bc440f3
to
40473ad
Compare
826b7ce
to
2a5d59d
Compare
this allows preview/thumbnail uploads alongside the initial request, and cleans up the upload form
f16f236
to
4951b3b
Compare
requested changes covered now refactored code
PR is ready, waiting for kukhariev/node-uploadx#337 |
Thanks @rigelk @kontrollanten and @kukhariev for your work and reactivity |
Description
Make audio/video uploads resumable when the internet connection is flaky. This is done by using node-uploadx and ngx-upload. This family of libraries supports multiple operations modes (TUS v1.0, a Google Resumable v3.0 variant and multipart). We selected the default mode, which is using a variant of Google Resumable (used in Drive and YouTube upload endpoints) and is summarized here: https://github.com/kukhariev/node-uploadx/blob/master/proto.md
/api/v1/videos/upload
was left untouched./api/v1/videos/upload-resumable
was created and dedicated to this new upload method.The OpenAPI spec was modified to include the new upload API.
Related issues
closes #324
kukhariev/node-uploadx#318
Has this been tested?
Screenshots