Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload images to Github server #157

Open
EvitanRelta opened this issue Jul 16, 2022 · 0 comments
Open

Upload images to Github server #157

EvitanRelta opened this issue Jul 16, 2022 · 0 comments
Labels
feature New feature

Comments

@EvitanRelta
Copy link
Owner

Pasting images into Github's issue editor uploads said image to their server.
U can then copy the image link, close the editor without saving, and boom, u've just uploaded said image to Github's server.
Thus, it should be possible to do it programmatically.

Checking the browser's HTTP requests traffic, it seems to interact with an undocumented API endpoint – https://github.com/upload/policies/assets

It's not implemented in the Github API library: Octokit.
And I couldnt find any official documentation of the API endpoint.
but there's some bootleg implementations floating around online. Here's one of them: https://github.com/maple3142/ghfileupl/blob/master/index.js

@EvitanRelta EvitanRelta added the feature New feature label Jul 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

No branches or pull requests

1 participant