Open
Description
Using repos.getContents
with mediaType: { format: "raw" }
Even though the raw content type is specified, the returned data.content
is still stringified so it's unsuitable to use with binary data it seems. For example, if requesting an image, the binary data will be mangled.
Is there any way to get around this with octokit/rest? The only way I found was to set mediaType: { format: "object" }
and then un-base64 encode the returned content, which obviously is not optimal.
Otherwise, I may just fetch the raw data directly bypassing octokit/rest
.
Relates to octokit/octokit.js#507