How to update media file with in an entry

System Information
  • Strapi Version: 3.2.4
  • Operating System: Mac
  • Database: mongo
  • Node Version: 14
  • NPM Version:
  • Yarn Version:

let us say that we have content type restaurant with fields (title: string, logo: media)
in create is simple form-data body = data: { “title”: “test”}, files.logo: FILE

but I couldn’t find in documentation and researching how to update the media
How can i update the logo for a specific restaurant

Hey @nebras,

This should work in a similar way. With an PUT /restaurant/{id} with form-data body = data: { “title”: “test”}, files.logo: FILE. Have you tried this?

1 Like

HI Yes I tried and wouldn’t work, but then found out that the custom update function I did wasn’t prepared for multipart , so I just updated the function and it worked

Thanks

1 Like

Hi

Can you please tell me how you resolved this issue by updating it for multipart?