Skip to content

feat: add support for AbortController signal in writeFile#216

Open
Dorosty wants to merge 1 commit into
os-js:masterfrom
Dorosty:patch-1
Open

feat: add support for AbortController signal in writeFile#216
Dorosty wants to merge 1 commit into
os-js:masterfrom
Dorosty:patch-1

Conversation

@Dorosty
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

andersevenrud commented Jun 29, 2024 via email

@andersevenrud
Copy link
Copy Markdown
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