@Andrey
I have faced another issue, Actually, I have made some changes to an image file, and save it. Why the image format change to pdf? how I can get image file?
here is a code, I want image file not pdf in any case:
instance.setHeaderItems(header => { header.push({ type: 'actionButton',
img: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"/></svg>',
onClick: () => {
const doc = docViewer.getDocument();
annotManager.exportAnnotations().then(xfdfString => { const options = { xfdfString, };
doc.getFileData(options).then(data => {
const arr = new Uint8Array(data);
const updateBlob = new Blob([arr],
{ type: 'image/jpeg'//'application/pdf'
});
const formData = new FormData();
formData.append('file', updateBlob, `${fileName}`);
//google drive update file API call here
}
});
});