Skip to content
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

Expose the onUploadUrlAvailable callback option #543

Merged
merged 4 commits into from
Feb 9, 2023

Conversation

cjauvin
Copy link
Contributor

@cjauvin cjauvin commented Jan 18, 2023

Following this conversation #524, I would like to propose to make the onUploadUrlAvailable callback officially and publicly available as an option.

@jean-kiepura
Copy link

👍 🥇

Copy link
Member

@Acconut Acconut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Thank you very much already!

docs/api.md Outdated Show resolved Hide resolved
})

await options.onSuccess.toBeCalled
expect(options.onUploadUrlAvailable).toHaveBeenCalled()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move this assertion before await options.onSuccess.toBeCalled so we know that the callback is invoked directly after the HEAD response? Or does this asynchronous behavior interfere with this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment below.

test/spec/test-common.js Outdated Show resolved Hide resolved
Copy link
Member

@Acconut Acconut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much!

@Acconut Acconut merged commit 2076ed1 into tus:main Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants