Is there a way to handle buffer to add to the file prop? #1635
-
In my current project, the BE team responded to me with a buffer of a PDF file, I've tried to convert it to Uint8Array but it seems like the PDF cannot load and I receive the text "No page specified." which shows that there is no data in the page document session. I hope anyone can help me with some examples. I'm currently using NextJS 13. I really appreciate any help you can provide. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
you can recive the buffer and convert to file, file can be a URL, base64 content, Uint8Array, and more. without more detail information, we can not help. |
Beta Was this translation helpful? Give feedback.
-
well it seems like converting the buffer to base64 makes it work, I'm not sure why this wasn't run before but I'm glad that it works |
Beta Was this translation helpful? Give feedback.
you can recive the buffer and convert to file, file can be a URL, base64 content, Uint8Array, and more. without more detail information, we can not help.