-
Notifications
You must be signed in to change notification settings - Fork 125
Fix the "replace audio" flow on the upload page #13587
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
Conversation
rickyrombo
commented
Jan 16, 2026
- Adds support for the "replace audio" flow inside the upload form
- Adds support to SDK to abort the upload files
- Adds support to the hook to abort the files
- Upload page will track refs to each uploading/uploaded file and abort/remove when tracks are removed, and abort/replace when tracks are replaced
- Fixes a bug with the upload starting even if the user didn't confirm the upload
- Fixes a bug where the screen would flicker back to the start of the upload page if the user clicked "view upload"
- Fixes a bug where single track uploads would send you to teh profile page on completion
|
| }) | ||
|
|
||
| // Call callback immediately with upload handle (for cancellation) | ||
| onUploadCreated?.(upload) |
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.
Maybe the better play is to just return the upload? let the caller work with a tus.Upload directly, and apply their own handlers and extra options etc...
Seems like this is doing too much still to me...
| return { type: UPLOAD_TRACKS_FAILED } | ||
| } | ||
|
|
||
| export const resetProgress = (payload: { |
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.
retro baby let's go
| audio.src = file.preview | ||
| return { | ||
| clientId: crypto.randomUUID(), | ||
| clientId: crypto.randomUUID() as string, |
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.
i never knew we did this. i guess it's fine, wonder if we can borrow something more useful from sentry though / similar
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.
we don't - added it in an earlier pr because we were doing it based on index order and that changes. needed a stable id