Upload assets through plugin controller query?

Hey there

I can create content type items through my plugins controller.js and routes.js

However in order to upload related files for an entry i need to get the entry refID from the response and then i have to do a standard post request to upload files afterwards. also noting that v4 query API is JSON but to upload i need to send as FormData.

Firstly is there a way to upload files through the Entity Service API or the Query Engine API directly instead of a separate form submission / axios request?

And secondly, it requires me to authenticate the upload request even though the request is coming from within the Strapi project… is there a way to not need authentication as it’s an internal request?

Thanks

2 Likes

I am having the same problem. Any luck?

Any updates on this?