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

feat: add support for AbortController signal in writeFile #216

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Dorosty
Copy link
Contributor

@Dorosty Dorosty commented Apr 1, 2024

@Dorosty Dorosty changed the title add support for abortToken signal in writeFile feat: add support for abortToken signal in writeFile Apr 1, 2024
@Dorosty Dorosty changed the title feat: add support for abortToken signal in writeFile feat: add support for AbortController signal in writeFile May 5, 2024
@ajmeese7
Copy link
Member

@andersevenrud with a squash and merge so we can use the correct commit message syntax, I see no problems with this one. Thoughts?

@andersevenrud
Copy link
Member

andersevenrud commented Jun 29, 2024 via email

@andersevenrud
Copy link
Member

andersevenrud commented Jul 22, 2024

I was looking at merging your work, but I had to refresh my memory a little bit, and there are two ways uploads are handled:

const op = options.xhr
? fetchXhr(target, fetchOptions)
: window.fetch(target, fetchOptions);

The XHR method is used when there's need to track the upload progression. The AbortController does nothing here, however I suppose it's possible to override the signal.abort() method to do a req.abort() inside the XHR request factory 🤔

Or maybe you guys have some better ideas ?

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.

3 participants