Setting up Hedgedoc with Storj S3

My version of Hedgedoc is: 1.9.9

I’m trying to set up image uploading with Storj’s provided S3 Access to my buckets.
I’ve currently configured my environment variables for docker compose to look like this:

# Upload Configuration
CMD_IMAGE_UPLOAD_TYPE=s3
CMD_S3_ACCESS_KEY_ID=<access_id>
CMD_S3_SECRET_ACCESS_KEY=<access_id>
CMD_S3_ENDPOINT=gateway.storjshare.io
CMD_S3_BUCKET=hedgedoc
# below option does not change the outcome, wether it is set to false, or true
#CMD_S3_PUBLIC_FILES=true

What I’m currently observing that’s happening is, that the images successfully upload, but the returned URL that is inserted into the Markdown seems to be invalid:

Generated Image URL:

![](https://gateway.storjshare.io/hedgedoc/uploads/<UUID>.png)

The above error seems to happen, because the wrong URL is inserted into the Markdown after uploading. Sharing the image from the Storj Web interface, I get the following URL format:

https://link.storjshare.io/s/ju<letters>za/hedgedoc%2Fuploads%2F<UUID>.png?wrap=0
AccessDeniedAccess Denied.uploads/<UUID>.png

What would be the best way to configure Hedgedoc to use Storj? Thanks for any help you can give me, I’ll appreciate it :smiley:
I’ll provide any extra info if necessary, just tell me what I should provide.

Hi @Sangelo and welcome to the HedgeDoc community!

For HedgeDoc 2.0 we’re aiming to support the s3 GetObject API (issue on GitHub), that’ll probably also resolve the problems with Storj as long as they implement the s3 API correctly.