-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Bug in 7.1.1: adding request.field() fails if value is not Blob #1680
Bug in 7.1.1: adding request.field() fails if value is not Blob #1680
Comments
I had the same issue and I've downgraded to |
Can we get a PR to fix this? |
I still can experience the same bug in latest version, v7.1.1. Is there a workaround or a fix planned? |
Any news? |
@niftylettuce Hi, I've fixed the bug and hope to merge branches soon, thank you!🎉 |
fix: adding request.field() fails if value is not Blob (#1680)
Released in v7.1.4 to npm, thank you @ltxhhz https://github.com/visionmedia/superagent/releases/tag/v7.1.4 |
Trying to add a field to a request (
request.field('keyname', 'fielddata');
) fails in 7.1.1 on Google Chrome and generates the following error:failed to execute 'append' on 'formdata': parameter 2 is not of type 'blob'.
Culprit seems to be this line:
https://github.com/visionmedia/superagent/blob/84206c75214e20bbc688d0645880696ecd773c27/src/request-base.js#L463
Calling
FormData.append(name, value, options);
does not seem to work ifvalue
is not aBlob
andoptions
isundefined
. The options parameter has to be omitted.The text was updated successfully, but these errors were encountered: