Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
uploadLogo = (file, id) => {
const logoForm = form({
logo: file
});
return post({
url: formatUrl(routes.UPLOADLOGO),
headers: {
Authorization: `Bearer ${this.getToken()}`,
ContentType: 'multipart/form-data; boundary=,',
Accept: 'image/jpg, image/png,image/*;q=0.8,*/*;q=0.5'
},
body: logoForm,
query: {
data: id
}
});
}
personasUpload = ({
id,
file
}) => {
const personaForm = form({
id,
file: file.handle
});
return post({
url: formatUrl(routes.UPLOADPERSONAS),
headers: {
Authorization: `Bearer ${this.getToken()}`,
ContentType: 'multipart/form-data; boundary=,',
Accept: 'text/csv'
},
body: personaForm
});
};