vighnesh153 / simple-github-gist-api

[DEPRECATED: New package -> @vighnesh153/github-gist] Promise based abstraction, over http, for storing data on Github Gist.
MIT License
8 stars 2 forks source link

Is it possible to write image files to a gist #1

Open blurymind opened 3 years ago

blurymind commented 3 years ago

My goal is to be able to do it starting from an <input onChange=... event.

Is this possible? I know we can commit image files using the git cli interface

vighnesh153 commented 3 years ago

Sorry for the late reply.

This is an interesting use-case. Will have to explore more about how I can modify the current code to upload files of all extensions to github gist. I will update here when I have something.

Meanwhile, you can also look at Imgur for uploading your images.

blurymind commented 3 years ago

Thing is I want to have my json files and images in one place and be able to have it private (secret gists) :) this is why imgur is not an option for me

vighnesh153 commented 3 years ago

Got it.

Just one thing, until I find a better way to upload images to a gist:

blurymind commented 3 years ago

oh I know about that, was just hoping I dont have to do it :)

There is a way to commit an image to a gist https://gist.github.com/remarkablemark/feff40b0a522f0c41c4eff0b77ea1d47 just not sure if we can do it with the REST api, which is what I need. My pwa doesnt have propper access to the file system (not on mobile at least)

I can write the files to cache and they have datauri if that helps