Question about GitHub API v3 – files –

Hey there,

I had a question on GitHub's API for creating a new file. According to the documentation, you need a filepath (base64) to upload. Is it possible to instead upload code as string and not a file?

This is because I'm building a chrome extension that looks at code and uploads it to GitHub repo. However, the code is "string" and I'm not sure how I can convert it to file first (without downloading to user's system) and then upload that file to Github. Is direct code commit not possible?


Thanks a lot.

submitted by /u/bci-hacker
[link] [comments]

Read more here:

Content Attribution

This content was originally published by /u/bci-hacker at Github: social coding, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: