Merge the IIIF and File imports
A refactoring of the file import could allow importing any amount of images, PDF or IIIF manifests or collections at once without the current restrictions:
- Do not create any 'Import' folder on the backend when importing from files
- Do not have the task make or use a folder for the whole import task, unless the user selected an existing folder to import into (frontend#235 (closed))
- For files that have a single page (images, single-page PDFs), create the element all alone without a folder and use the filename as it's name (importing
lol.jpg
becomes alol
element) - For files that have multiple pages (multi-page PDFs), create a folder with the PDF's filename and have numbered pages (
lol.pdf
becomes a bunch of1
2
3
pages in alol
folder) - For files with complex structures (IIIF), let the file-specific function deal with it.
- For files that have existing elements (searching by name), skip them just like the current import. For IIIF files, do not skip anything (will be handled in #13 (closed))
This can have side effects on a few related issues:
- Strange page numbers when importing images (everything is numbered 1), because page numbers were reset with each file
- Lack of error handling causing a file import to crash on any exception for a file
Edited by Erwan Rouchet