Skip to content

I want to understand how to upload files to GitHub… #50

Closed Answered by kyoshino
rchrdnsh asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, Sveltia CMS uses the GitHub GraphQL API to upload files. This example just shows a simple text file, but any file, including images, can be uploaded if encoded in base64. Sveltia’s implementation can be found in github.js 🙂 I think Netlify/Decap CMS still uses the REST API to upload files, which is unnecessarily complicated. The GraphQL API is way easier!

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by rchrdnsh
Comment options

You must be logged in to vote
5 replies
@kyoshino
Comment options

@kyoshino
Comment options

@rchrdnsh
Comment options

@kyoshino
Comment options

@rchrdnsh
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants