Open rb090 opened 20 hours ago
Can you just confirm you are using plugins.js
and not plugin.js
as your issue suggests?
Oh no I am sorry for this. That was a typo (auto correction on Mac I overseen 😞). Yes I confirm that the name of the file is plugins.js
. I also corrected the issue description regarding this.
Bug report
The urls for uploaded video files are wrong saved into the DB.
I use Strapi
v4.25.13
with the plugin@strapi/provider-upload-aws-s3
in version4.25.13
to upload any kind of assets to a bucket.I am not using AWS buckets. I am using OTC OBS buckets. But they work 100% the same like AWS buckets. We develop several services which were connected to OTC buckets and we were able to use the AWS SDK.
Required System information
Running
yarn strapi report
gave me the following output:Describe the bug
The uploads are successful for different kind of files (images, pdfs) but for videos, the upload url is wrong.
For any kind of videos, the url in the DB looks sth like this:
https:///<BUCKET-NAME>/myvideo.mp4
.Instead of the custom
endpoint
I set up in myplugins.js
.Is there a chance that my
plugins.js
is somehow wrong and I only need to correct sth?Steps to reproduce the behavior
@strapi/provider-upload-aws-s3
plugin and connected bucketfiles
table in the database and check theurl
property. It has corrupted url.Expected behavior
I expect that the
file.url
corresponds definedendpoint
inplugin.js
and the filename is appended at the end ->https://obs.${env("AWS_REGION")}.otc.t-systems.com/filename.extension
. Like it behaves when uploading images or any other type of files.Screenshots
NONE
Code snippets
My
plugins.js
:My
middlewares.js
:Additional context
I installed the plugin to my Strapi project with
yarn add @strapi/provider-upload-aws-s3@4.25.13