Hi, I work on an application that integrates with outlook mails and displays it on my site, I have a feature that allows the user to download and upload files from email attachments.
when the user tries to download and then upload to his drive the file is corrupted.
I am uploading the buffer array that I am getting from the attachment endpoint
I can't find why the file is corrupted, I have checked multiple times and I pass the same array as I am getting from the attachments endpoint
this is how my upload request looks like :
const response = await axios.put(
https://graph.microsoft.com/v1.0/${where}/drive/root:/${path}/${name}:/content?@microsoft.graph.conflictBehavior=rename,
item,
{
headers: {
Authorization: Bearer ${token},
'Content-Type':fileContentType,
},
}
);