Skip to content

Conversation

@rickyrombo
Copy link
Contributor

  • 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

@changeset-bot
Copy link

changeset-bot bot commented Jan 16, 2026

⚠️ No Changeset found

Latest commit: a3e15a9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

})

// Call callback immediately with upload handle (for cancellation)
onUploadCreated?.(upload)
Copy link
Contributor Author

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: {
Copy link
Member

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,
Copy link
Member

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

Copy link
Contributor Author

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

@rickyrombo rickyrombo merged commit 85bbeb4 into mjp-tus-upload Jan 16, 2026
12 of 14 checks passed
@rickyrombo rickyrombo deleted the mjp-tus-replace-audio branch January 16, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants