Getting very long buffer array

System Information
  • Strapi Version: 4.1.3
  • Operating System: Windows 11
  • Database: PostgreSQL
  • Node Version: 14.17.2

When I’m uploading an image to strapi for some reason when I call api to get media info I’m getting a very long array (100000 line) in a field called buffer. Any help?

@Louai_Kelani I had this today too! Any ideas what is was in the end? I re-uploaded the image and it disappeared!

Yes I was using the replace feature by passing the id as query in the request url example: yourdomain.com/api/upload?id=YOUR_MEDIA_ID and it was causing this. the problem is that they didn’t mention the replace handler in the documents so I went to the node modules and found the replace function then I extended the upload plugin to fix the replace function and It worked well. Hope that will answer your question.

1 Like

Amazing thanks @Louai_Kelani ! This bug just caused one of our Nuxt sites to break just before launch because Javascript was dying trying to parse the huge payload! It’s good to know why it happened.

Thanks again

Glad that I helped