hedgedoc/docs/content/references/config/media/imgur.md
Philip Molares e07cd62596 docs: restructure documentation
This rewrite follows the principles of https://diataxis.fr/

Co-authored-by: Erik Michelson <github@erik.michelson.eu>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2023-09-17 21:50:21 +02:00

1.3 KiB

Imgur

!!! warning "Imgur saves anonymous images for only 6 month" Imgur will delete images not associated with any account 6 month after the last access.
This means that if you use imgur as your image backend, you may lose images uploaded by you or your users. See this FAQ entry

You can use Imgur to handle your image uploads in HedgeDoc.

All you need for that is to register an application with Imgur and get a client id:

  1. Create an account on imgur.com and log in.
  2. Go to https://api.imgur.com/oauth2/addclient
  3. Fill out the form and choose "Anonymous usage without user authorization" as the authorization type.
  4. Imgur will then show you your client id.

Then you just add the following lines to your configuration:
(with the appropriate substitution for <IMGUR_CLIENT_ID> of course)

HD_MEDIA_BACKEND="imgur"
HD_MEDIA_BACKEND_IMGUR_CLIENT_ID="<IMGUR_CLIENT_ID>"

All uploads are saved in the media_uploads database table and contain the deletion token (see here) in the column backendData.