Merge the Images and PDF imports into a File import
DataImportMode.PDF
and DataImportMode.Images
are merged into a DataImportMode.Files
.
The decision to call the PDF or image extraction functions in the import task should be then made based on the MIME type instead of the mode (application/pdf
→ PDF, image/*
→ image, anything else → die in mysterious circumstances).
Please add a unit test that includes both an image and a PDF to verify that we can support both at once.