Skip to content
This repository has been archived by the owner on Feb 19, 2023. It is now read-only.

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

Open
blurymind opened this issue Apr 27, 2021 · 4 comments
Open

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

blurymind opened this issue Apr 27, 2021 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@blurymind
Copy link

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
Copy link
Owner

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.

@vighnesh153 vighnesh153 added the enhancement New feature or request label May 26, 2021
@vighnesh153 vighnesh153 self-assigned this May 26, 2021
@blurymind
Copy link
Author

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
Copy link
Owner

vighnesh153 commented May 28, 2021

Got it.

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

  • You can even convert the images to Data URL and then store the data urls in some file. Then, when you want to display the image, you can retrieve its data-url and use it.

@blurymind
Copy link
Author

blurymind commented May 28, 2021

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants