nextcloud-link icon indicating copy to clipboard operation
nextcloud-link copied to clipboard

Buffer string from `get` method isn't valid a document

Open maximelafarie opened this issue 2 years ago • 4 comments

I have some PDF files on NextCloud. Creating folders, adding files into them works well. But when it's time to retrieve theses files with the get method, the Buffer string returned by the method, even if converted in real Buffer, base64 or Blob can't be read by PDF utilities like PDFTron (loadDocument method).

The original pdf file is this one but is converted later by PDFTron (the file you can download below with a uuid name).

You can check the content returned by the get method here: dummy-pdf-buffercontent.txt

It is supposed to be this file: 2d372fe6-69f5-48fe-ba3b-03651aeef2f1 (1).pdf.

I don't know if it's library-related or just a personal implementation issue.

Cheers! 🖖

maximelafarie avatar Jul 21 '21 14:07 maximelafarie