Strapi Provider Upload DO - MIME Compatibility

Hello! I am using DO Space with the “strapi-provider-upload-do” provider to save my media files. Everything is saved correctly in Spaces, but I am having the following problems and I don’t know if it is a problem with the provider of Strapi, or directly with Strapi. The first problem I encountered was that the media library didn’t show a preview of the images, so doing some research, I realized that strapi’s middlewares.js file needs to be configured as follows:

module.exports = ({ env }) => [
    name: "strapi::security",
    config: {
      contentSecurityPolicy: {
        useDefaults: true,
        directives: {
          "connect-src": ["'self'", "https:"],
          "img-src": ["'self'", "data:", "blob:", `${env("DO_SPACE_CDN")}`],
          "media-src": ["'self'", "data:", "blob:", `${env("DO_SPACE_CDN")}`],
          upgradeInsecureRequests: null,

When you do this, the images are previewed in the media library, but not the videos. When I try to preview a video I get the following message: No video found that has a supported format and MIME type.

I have spent days trying to find a solution but there is no way, so if someone can help me, I would be very grateful.

1 Like

Having exactly the same problem – the video is successfully uploaded, but not rendering in the Strapi UI. It looks like the src attribute is being rendered incorrectly (i.e., it’s missing https://):

1 Like

Hey @Bipolab have you found any work around or solution for the issue you are facing with DO Spaces?
I am kind of having a hard time myself, even image previews are broken…url is https://https/strapi/img_name.png

@Bipolab : Hey, Did you manage to find the solution?
Having same issue with video previews

I added final working solution here: