System Information
- Strapi Version: 4.17
- Operating System: Mac OS X
- Database: Postgres
- Node Version: 16.15
- NPM Version: 8.5.5
- Yarn Version: N/A
I am not able to upload an entity-linked file from a custom controller. When I execute the code, the Media Library page goes offline and I have to manually delete the entry from the Files table in the DB. What am I doing wrong? See my code below.
const content = await strapi.db.query('api::content.content').create({
data: {
myfield: ctx.query.myfield
},
files: ctx.request.files
});