github icon indicating copy to clipboard operation
github copied to clipboard

Commit an image to a gist

Open blurymind opened this issue 4 years ago • 2 comments

Can we replicate this in javascript? https://gist.github.com/mroderick/1afdd71aa69f6b29601d335751a1a9be

When I try to write it with gist.update(...), I get a bunch of binary garbage uploaded.

I can however commit images to github with {encode: false}. Can a similar parameter be passed to gist.update?

blurymind avatar Apr 29 '21 19:04 blurymind

could perhaps setting a custom media type do it? https://docs.github.com/en/rest/reference/gists#custom-media-types-for-gists

can this library even do it and if so where?

blurymind avatar May 01 '21 16:05 blurymind

or maybe commit it from cache, after putting it there with the filesystem api? https://www.arcusglobal.com/news/file-system-how-to

blurymind avatar May 03 '21 13:05 blurymind