System Information
- Strapi Version:
- Operating System:
- Database:
- Node Version:
- NPM Version:
- Yarn Version:
I have a strapi collection with a media element in it. What I want to do now, is accessing the media element in a lifecycle hook.
With:
const media = await strapi.query("file", "upload").findOne({ id: data.addressCSV })
I can already receive the ID of my file. Next step is to load the file, process it and return the content in a different field. → but how can I do that? I was trying to call the plugin.upload controller, which is returning me: error TypeError: Cannot read property 'isAuthenticatedAdmin' of undefined
, so that doesn’t seem to work …
Does anybody has a god idea?