Replies: 1 comment
-
Definitely in favor of making this easier, but I think I remember looking into it and finding that not 100% of web environments support I like your idea of making a utility for translating it back and forth though! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Checked
Feature request
Allow document loaders (like
PDFLoader
) to be acceptbuffer
inputs.Motivation
Next.js apps can end up with
buffer
objects, for example, submitting a file via a form:Calling (code snippet):
Because
PDFLoader
takes only astring | Blob
, it can't handle abuffer
so in this code, the buffer has been written to a temporary file.Proposal (If applicable)
Either allow
BufferLoader
to accept a Nodebuffer
object, or build a utility that can convertbuffer
toBlob
. Note that as theBufferLoader
setssource
attribute, that might be something we'd want to send as metadata.Not sure the right/best way to go on this, but it's kinda painful. But maybe my code example is not the "best" way to do it (though to my eyes, it's certainly fairly clean?)
Beta Was this translation helpful? Give feedback.
All reactions