Discover Packages
github.com/drogers0/gh-image
internal
upload
package
Version:
v1.0.3
Opens a new window with list of versions in this module.
Published: Jun 4, 2026
License: MIT
Opens a new window with license information.
Imports: 14
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
GetUploadToken fetches the repo page and extracts the uploadToken
from the JS payload. Requires authenticated cookies in the client.
NewClient creates an http.Client with the GitHub session cookies set.
GitHub requires both user_session and __Host-user_session_same_site
for CSRF validation on the upload endpoint.
Result holds the output of a successful image upload.
Upload uploads an image file to GitHub and returns the asset URL.
owner/repo identifies the target repository, repoID is its numeric ID.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.