Skip to content

Server-side verification of PDF files #3

@kylepolich

Description

@kylepolich

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?

try:
    test = pdf_loader.load(filename)
    print("this is a pdf")
except:
    print("not a pdf")

Find the best solution without extreme effort.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions