How to associate a file in a S3 bucket

Hi, I’ve some files in my S3 bucket and I want to associate them in the Strapi’s Database, is there any API to do that?

related to How to create a media object from image URL programatically

If I can’t find a solution I’ll just try to extend Strapi’s Rest API, not the best solution but it works.

As far as I know, there’s no web API to do that. I recommend you look at the code for the upload plugin, and create your own plugin that can use the Strapi Entity Service (an internal API, only for plugin code) to create a ‘compatible’ uploaded media entry for each of your existing files. Look at where the upload plugin calls its provider to ‘store’ the uploaded file and get back a completed ‘file’ object, which it then uses to create the media entry.