Open jamiek-acl opened 4 years ago
I am using superagent v5.1.0 in a React file uploader component I am building. As a file is being uploaded, the component allows me to click a button and cancel the upload. Then I can click another button to restart it.
First I start my upload:
const formData = new FormData(); formData.append("file", theImageFile); superagent .send(formData) .on('progress', () => { ... }) .end((err, response) => { ... })
Then I cancel my upload:
superagent.abort();
Finally, I restart my upload (same code as when start it) and superagent throws the error: "Can't merge these send calls". The error can be seen here: https://github.com/visionmedia/superagent/blob/56ce51728083392132505218c05edd5cf9f60c58/src/request-base.js#L609
How can I get around this? Is this possible in superagent?
Thanks.
I am using superagent v5.1.0 in a React file uploader component I am building. As a file is being uploaded, the component allows me to click a button and cancel the upload. Then I can click another button to restart it.
First I start my upload:
Then I cancel my upload:
Finally, I restart my upload (same code as when start it) and superagent throws the error: "Can't merge these send calls". The error can be seen here: https://github.com/visionmedia/superagent/blob/56ce51728083392132505218c05edd5cf9f60c58/src/request-base.js#L609
How can I get around this? Is this possible in superagent?
Thanks.