WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm struggling with producing a functional code for an endpoint that facilitates upload of arbitrary amount of binary files. (https://swagger.io/docs/specification/describing-request-body/file-upload/ multiple file upload section).
The generated class for multipart data contains this:
... def to_multipart(self) -> Dict[str, Any]: files: Union[Unset, Tuple[None, str, str]] = UNSET if not isinstance(self.files, Unset): _temp_files = [] for files_item_data in self.files: files_item = files_item_data.to_tuple() _temp_files.append(files_item) files = (None, json.dumps(_temp_files), "application/json") ...and json.dumps than of course doesn't work for binary data.
My endpoint looks approximately like this:
I've used version 0.10.4 to generate the client. Please advise.
Beta Was this translation helpful? Give feedback.
All reactions