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

How to abort file upload in apollo-upload-client? #162

Closed
swomack opened this issue Jun 19, 2019 · 2 comments
Closed

How to abort file upload in apollo-upload-client? #162

swomack opened this issue Jun 19, 2019 · 2 comments

Comments

@swomack
Copy link

swomack commented Jun 19, 2019

I was looking into the code of apollo-upload-client and i came across the following code -

var _createSignalIfSuppor = createSignalIfSupported(),
controller = _createSignalIfSuppor.controller,
signal = _createSignalIfSuppor.signal

if (controller) options.signal = signal

It seems to override the signal object passed with query/mutation's fetchOption and replace with another signal object.

Given this, can you please tell me how should i abort the file upload as i dont have access to this AbortController object.

@veeramarni
Copy link

Interesting, how can we abort the upload when the user wants to cancel the upload and provide options on when to clean up?

@jaydenseric
Copy link
Owner

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

No branches or pull requests

3 participants