Why can't my Qiniu Cloud S3 attachments load in the forum after successful upload?

Successfully uploaded to cloud storage vendor Qiniu Cloud, the loaded link is: https://img.i4ta.com/original/1X/5be788f6a5e3d0efa278e1e87b6c6ca6be2ce4cf.mp4, and the browser prompts:

{
"error": "download token not specified"
}

The video loaded in the topic:


<video width="100%" height="100%" preload="metadata" controls="" style="display:none">
          <source src="https://img.i4ta.com/original/1X/5be788f6a5e3d0efa278e1e87b6c6ca6be2ce4cf.mp4">
          <a href="https://img.i4ta.com/original/1X/5be788f6a5e3d0efa278e1e87b6c6ca6be2ce4cf.mp4">https://img.i4ta.com/original/1X/5be788f6a5e3d0efa278e1e87b6c6ca6be2ce4cf.mp4</a>
        </video>

Is it not using private bucket authentication? But I don’t know where to configure it. Are there any experts who know how to solve this?

have you read this topic?

I don’t know anything about Qiniu Cloud or if their S3 storage is supported, but you will need an access key and token (I believe they are generated in your Qinui Cloud console). If it’s possible, your app.yml file settings should probably look something like this example:

## S3 storage
  DISCOURSE_USE_S3: true
  DISCOURSE_S3_REGION: whatever
  DISCOURSE_S3_ENDPOINT: http://s3-ap-southeast-1.qiniucs.com
  DISCOURSE_S3_ACCESS_KEY_ID: *************
  DISCOURSE_S3_SECRET_ACCESS_KEY: *****************
  DISCOURSE_S3_CDN_URL: http://qiniu.pengfeima.cn
  DISCOURSE_S3_BUCKET: qiniu-s3
  DISCOURSE_S3_BACKUP_BUCKET: qiniu-s3/backups
  DISCOURSE_BACKUP_LOCATION: s3
1 Like

Indeed https://img.i4ta.com/original/1X/5be788f6a5e3d0efa278e1e87b6c6ca6be2ce4cf.mp4 gives that error. You’ll need to check somewhere that people know about your to configure i4ta. I’m pretty sure that it has to do whey the configuration there.

Yes, I installed it via docker-compose, and I have configured the AK and SK in the Discourse backend, and I can successfully upload files. The only issue is that I cannot view them. I have checked all possible configurations and haven’t found where to configure adding the token to the CDN link when accessing it. Since this storage is private, the token must be included. Are there any other places besides the configuration you mentioned above?


Here is my configuration, is it correct? Are there any other related configurations needed?