Hello,
I have some problème with the upload API. When my fichier contain accent, the API return a status 401 and when I change the character without the accent it works. But in french, we need the accent. I want to know if there is a solution for this?
For the moment I use unicode() for change automatically characters that are problematic.
This is the code I use for uploading a file with the API:
return await axios({
url: url,
method: 'post',
data: metadata,
headers: {
'Authorization': 'Bearer ' + stockageInfo.token,
'Content-Type': 'application/octet-stream',
'Dropbox-API-Arg': JSON.stringify({
path: dossierId + '/' + unidecode(titre) + '.' + ext,
mode: 'overwrite'
})
}
}).then((d) => {
return d.data.id
}).catch((e) => {
// statements
console.log(e)
return null
})