web / lib/collections/import-files
lib/collections/import-files
Defines the Payload CMS collection configuration for Import Files.
This collection acts as a record for every file uploaded to the system for data import.
It leverages Payload’s upload functionality to store the file itself, while also tracking
extensive metadata about the import process, such as:
- The original filename and system filename.
- The user or session that initiated the import.
- The overall status of the import (e.g., pending, parsing, completed, failed).
- Information about the datasets detected within the file.
- A reference to the background job responsible for processing the file.
An afterChange hook is used to automatically trigger the dataset-detection job
as soon as a new file is uploaded and created in this collection.
⚠️ Payload CMS Deadlock Prevention This file uses complex hooks with nested Payload operations. See: apps/docs/content/developer-guide/development/payload-deadlocks.mdx
Variables
default
constdefault:CollectionConfig
Last updated on