javascript
Upload Image & File
const form = new FormData();
form.append('image', {
name: 'image',
type: 'image/jpeg',
uri: data.uri,
});
axios
.post(`${URL}/api/v1/uploads/image`, form)
.then(function (response) {
})
.catch(function (error) {
console.log('err', error.response.data);
});
Was this helpful?
Similar Posts