Skip to content
New issue

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

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

Already on GitHub? # to your account

Add Self-Hosted Hasty Paste to Pastebin upload solution #18

Open
EVOTk opened this issue Sep 25, 2022 · 1 comment
Open

Add Self-Hosted Hasty Paste to Pastebin upload solution #18

EVOTk opened this issue Sep 25, 2022 · 1 comment
Labels
enhancement New feature or request feature:upload

Comments

@EVOTk
Copy link

EVOTk commented Sep 25, 2022

Hello,
Is it possible to integrate the self-hosted solution https://github.com/enchant97/hasty-paste as an Pastebin upload solution?

Hasty paste can be used via API keys:
https://enchantedcode.co.uk/hasty-paste/rest-api.html

Ideally, if it would be possible to set the default expiration time ( never / x days / x hours ...) in settings that would be great.

thanks again


Exemple USE API :

curl -X 'POST' \
  'https://paste_url/api/pastes' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "content": "string",
  "expire_dt": "2022-10-25T12:18:34.347Z",
  "long_id": true,
  "content": "test"
}'

Acces to paste via : https://paste_url/<paste_id>

Réponse :

{
  "creation_dt": "Sun, 25 Sep 2022 12:24:40 GMT",
  "expire_dt": "Tue, 25 Oct 2022 12:18:34 GMT",
  "lexer_name": null,
  "paste_id": "uwZXsvCngRgXhTeCnUUpg6DOu0UPF5GgspEIETGB",
  "title": null,
  "version": 1
}

Acces to paste via : https://paste_url/<paste_id>
Acces to exemple paste via : https://paste_url/uwZXsvCngRgXhTeCnUUpg6DOu0UPF5GgspEIETGB

@caesay
Copy link
Member

caesay commented Sep 26, 2022

Clowd does already support HasteBin, which is a clean/simple self-hosted upload solution with automatic-syntax-highlighting. https://github.com/toptal/haste-server. I will have a look at this though

@caesay caesay added enhancement New feature or request feature:upload labels Sep 26, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request feature:upload
Projects
None yet
Development

No branches or pull requests

2 participants