I am trying to get file content of a media library item inside my controller so I can convert them to a zip and let user download them through a custom controller endpoint.
module.exports = {
async find(ctx) {
const entities = await strapi.services["cars"].find({
_where: { ID: 001 },
});
// I have media url inside entities, but how do I get the content so I can pass it to a function to zip it
// up.
// zip function...
// return ReadableStream
}
}
System Information
- 3.6
- MacOS
- sql
- 16.9
- 8.19