You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ddurham2
changed the title
[BUG] Description
[BUG] [angular-typescript] JSON object has a filename of "blob" in HTTP request multipart form data
Mar 23, 2020
Hello,
This is related to the fix for bug [#2733]
For the typescript-angular generator, there is an additional issue with the code generated, when using a multipart/form-data object.
I'm using the latest version as of this writing
Declare a POST method with the following requestBody:
The generated service works, but the request body's foo object has a filename.
The problem is that filename="blob" value. It is making some backends think I'm uploading a file here.
The generated code looks something like:
Blob() is naming itself "blob", but the problem for these backends goes away when I change the generated code to:
... where I have explicitly given an empty filename to the append() method.
The request body now looks like
Otherwise, how is a backend to know whether it's to pass a real file on disk (named "blob") to the handler or an in memory object?
I'll be glad to take a stab at creating a PR unless there are obvious objections to making such a change.
The text was updated successfully, but these errors were encountered: