Video preview is not working inside strapi when using DigitalOcean spaces as it assign wrong url

System Information
  • Strapi Version: v4.3.6
  • Operating System: mac os Monterey
  • Database: postgres
  • Node Version: v16.13.1
  • NPM Version:
  • Yarn Version: 1.22.11

Hello there, i’ve some trouble using DO space with video media.
When i’m inside the content manager i can’t select a video, it works well for image media.
Second, the url of the video media is not the same as the image so it cant be rendered on the front end.
And last i can’t see the preview of my image and my video.
Url for img media : https://my_do_space_bucket.my_do_space_end_point/7b32369b2c46c0e892fc4bd15cf8ea40.jpeg?updated_at=2022-10-13T07:04:49.938Z
Url for video media : MY_DO_SPACE_END_POINT/7b32369b2c46c0e892fc4bd15cf8ea40.jpeg?updated_at=2022-10-13T07:04:49.938Z (missing the https:// and my DO_SPACE_BUCKET)
im using the strapi-provider-upload-dos.

my config/plugins.js :


  upload: {
    config: {
      provider: "strapi-provider-upload-dos",
      providerOptions: {
        key: env("DO_SPACE_ACCESS_KEY"),
        secret: env("DO_SPACE_SECRET_KEY"),
        endpoint: env("DO_SPACE_ENDPOINT"),
        space: env("DO_SPACE_BUCKET"),
      },
    },
  },
  1. my middlewares.js
 "strapi::errors",
  {
    name: "strapi::security",
    config: {
      contentSecurityPolicy: {
        useDefaults: true,
        directives: {
          "connect-src": ["'self'", "https:"],
          "img-src": [
            "'self'",
            "data:",
            "blob:",

           "MY_DO_SPACE_BUCKET.MY_DO_SPACE_END_POINT",
          ],
          "media-src": [
            "'self'",
            "data:",
            "blob:",

            "MY_DO_SPACE_BUCKET.MY_DO_SPACE_END_POINT",
          ],
          upgradeInsecureRequests: null,
        },
      },
    },
  },
  

anyone have already struggle with this? any help would be great, thanks a lot!

@NalessoAxel I’m facing a similar issue image previews are working perfectly but only Videos could face the issue