Open kylepolich opened 4 years ago
Spend 2-3 hours researching and implementing the best way to test if the file is a PDF.
Certainly there is time enough to check that the file ends in .pdf at a minimum.
.pdf
Does a nice python library (which does not increase the deployment.zip file by too much) exist which can check the header of the file?
Any way to do something like this?
try: test = pdf_loader.load(filename) print("this is a pdf") except: print("not a pdf")
Find the best solution without extreme effort.
I think that Server-side verification of PNF files should be Server-side verification of PDF files, right?
Server-side verification of PNF files
Server-side verification of PDF files
Spend 2-3 hours researching and implementing the best way to test if the file is a PDF.
Certainly there is time enough to check that the file ends in
.pdf
at a minimum.Does a nice python library (which does not increase the deployment.zip file by too much) exist which can check the header of the file?
Any way to do something like this?
Find the best solution without extreme effort.