How do I update file in a model in strapi via API?

you need to use FormData and:

formData.append('files.thumb', file)