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

Can you post JavaScript code you are using for upload