Skip to content

The media upload endpoint does not like application/octet-stream #56

@jakeonfire

Description

@jakeonfire

the code has a fallback for application/octet-stream here:

else MIME_TYPE_MAP[File.extname(file_path).delete(".").downcase] || DEFAULT_MIME_TYPE

but the API requires one of these:
Image

the error returned from the API is Invalid Request: One or more parameters to your request was invalid.

fwiw this was an issue for us since we were trying to upload Tempfiles with no extension. it was unclear what the issue was. it might be clearer to raise an error instead of using this DEFAULT_MIME_TYPE fallback. application/octet-stream used to work before the switch to the newest v2 media upload endpoints.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions