Open awalker4 opened 3 months ago
Same thing happens when passing in a blob, which obviously has no filename. Shouldn't the library simply use the mimetype or trust that the passed contentType is correct?
Yes, apologies for the delay here! This will be addressed in #115
See this comment. If a pdf file does not have
.pdf
in the filename, we return the messageGiven file is not a PDF. Continuing without splitting.
. The issue is that loadPdf here should not return as soon as the file extension check fails. Let's try to load the file in pdf-lib, and only return if that fails.