Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the support of uploading & showing binary files #377

Open
yqs112358 opened this issue Nov 15, 2024 · 2 comments
Open

Improve the support of uploading & showing binary files #377

yqs112358 opened this issue Nov 15, 2024 · 2 comments
Labels
discussion enhancement New feature or request

Comments

@yqs112358
Copy link

yqs112358 commented Nov 15, 2024

(🤔 Maybe this isn't a suggestion that fits the purpose of this project very well, but)
I've found that opengist can upload binaries (such as PDF files) via git push normally, and they're accessible after uploading. So, it might be meaningful to improve the support to binary files along the way, which is very useful to share texts with friends or to other devices along with some binary items.

Some possible improvements:

  • Determine whether the file is a binary file. (Use something like https://github.com/h2non/filetype?) If so, do not display its content in the gist page to avoid jamming the browser.
  • Support uploading or deleting binary files directly in the edit page of opengist. (Just add an upload button?)
  • For binary files, the "Raw File" button returns the content of the file directly as application/octet-stream instead of displaying it as text.
@thomiceli thomiceli added enhancement New feature or request discussion labels Nov 17, 2024
@thomiceli
Copy link
Owner

We should discuss if we need binary files in the first place, if yes which types?
At it's core I believe Opengist should stay a simple pastebin but it can be always useful to have something like a PDF or an embedded image.

@mammo0
Copy link

mammo0 commented Nov 27, 2024

  • Determine whether the file is a binary file. (Use something like https://github.com/h2non/filetype?) If so, do not display its content in the gist page to avoid jamming the browser.

I think at least this point would be a very good feature. Currently I also have some PDFs in my gists and displaying them as raw text sometimes leads to a lot of scrolling.

  • Support uploading or deleting binary files directly in the edit page of opengist. (Just add an upload button?)

Deleting of binary files is already possible when editing a gist. But like in the normal view they are displayed like a text file.
An upload button would be a nice feature but not a must-have.

  • For binary files, the "Raw File" button returns the content of the file directly as application/octet-stream instead of displaying it as text.

I think this can be implemented together with the first point.

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

No branches or pull requests

3 participants