Is it possible to extend the Upload plugin on a Strapi Cloud project?

Hi all,

I’ve got a Strapi V4 project deployed through Strapi Cloud and I’m very happy with the Strapi Cloud service so far. I liked the fact it took a lot of config and deployment pain out of getting a Strapi project up and running quickly.

My application is heavily video (mp4) content based and has a mission critical requirement: I need to store video durations on the server (for example, as Media object metadata) when uploading my videos via the Strapi Admin panel, and specifically, the default Media Manager. Storing video duration is unfortunately not done by default, as it’s usually only calculated when loading the video into a player on the client side.

As I understand it, in the up-to-date version of Strapi, the Media Manager is a plugin that uses the Upload plugin under the hood to upload media.

The next question was then: Which upload provider does a Strapi Cloud project use by default (because I didn’t specify/override this anywhere in my config). I couldn’t see anything about this in the docs, so I made an API request for some video media from my project. On investigating the response, I see that the provider is listed as: “strapi-provider-upload-strapi-cloud”. As seen in this part of my API response:

"media": {
                        "data": {
                            "id": 22,
                            "attributes": {
                               ...
                                "provider": "strapi-provider-upload-strapi-cloud",
                                "provider_metadata": null,
                                "createdAt": "2023-06-08T13:22:08.994Z",
                                "updatedAt": "2023-06-08T13:22:08.994Z"
                            }
                        }
                    },

If I look at the docs I can see the 3 supported upload providers are:

  1. AWS-S3
  2. Cloudinary
  3. Local

“strapi-provider-upload-strapi-cloud” is clearly not on this list. Is it a standalone provider or does it perhaps use AWS-S3 under the hood? Either way, if I’m going to stick with Strapi Cloud I really need to understand if it’s possible to extend this provider so that I can capture and store video duration on upload of a video file in a way that is update safe (ie. not going to break with every new Strapi update).

If anyone can offer any help or advice I would be hugely grateful, even if it’s just to point out that I’m being dumb and missing an obviously better solution!

Thanks

1 Like

+1 for this question.

1 Like