Skip to content

Accept in-memory files in the Files API upload. - #499

Open
goran-revops wants to merge 1 commit into
HubSpot:masterfrom
goran-revops:accept-in-memory-file-uploads
Open

goran-revops wants to merge 1 commit into
HubSpot:masterfrom
goran-revops:accept-in-memory-file-uploads

Conversation

@goran-revops

Copy link
Copy Markdown

Fixes #459

files_parameters always called open() on the file value. A path worked. BytesIO and raw bytes crashed.

If the value has read(), read it. If it is bytes, use those. Otherwise open the path.

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

Successfully merging this pull request may close these issues.

Files API upload does not accept BytesIO or in-memory bytes

1 participant