Commit Graph

4 Commits

Author SHA1 Message Date
Naz
74a1ab4525
Fixed root zip media/files copying during import
refs https://github.com/TryGhost/Toolbox/issues/523

- During import process of content files the files from the root directory were also copied over. This is causing chaos in the root of content folder with files that only needed for data import. For example, the csv files needed for Revue import were also copied over by "file importer" even though those do not belong to any content.
- The approach of filtering on a "handler" level was taken over filtering in the import manager due to how our globing patterns work. See a previous commit with reverted previous fix for more context.
2023-03-16 22:48:57 +01:00
Naz
116e69afcd
Refactored importer's content file handler
refs https://github.com/TryGhost/Toolbox/issues/523

- Renamed variables that were too media-specific
2023-03-02 17:54:19 +08:00
Naz
b0b80d672d
Refactored content file handler constructor
refs https://github.com/TryGhost/Toolbox/issues/523

- To support generic "file" import handling the content file handler needs more configuration options for properties like type, extensions, content path etc. This refactor makes the handler configurable and reusable for any type of file import
2023-03-02 17:54:18 +08:00
Naz
bf215be0f8
Renamed media import handler to file handler
refs https://github.com/TryGhost/Toolbox/issues/523

- We need to process generic files like .pdf, .md, etc. on the importer "handler" stage.
- The media handler can process more than just media files after few refactorings. Renaming it to a generic content file handler indicates it can process any type of content file.
- In future we can substitute the built-in "images" import handler with this generic content file handler.
2023-03-02 17:54:18 +08:00