Info: This plug-in is part of a set of sample plug-ins that is shipped with Assets Server. For more information, see Assets Server sample plug-ins.
Note: The use of internal plug-ins such as sample plug-ins has been deprecated in Assets Server 6.73. These plug-ins should instead be created as an external plug-in.
The hot folder import plug-in works like a 'consuming' hotfolder. It checks for new files in the configured folder, imports them into Assets Server and then deletes the files from the folder. Any subfolder structure within the hotfolder is mirrored within Assets Server. Typical use for this folder import are importing continuous feeds of wire images or a drop-box.
Note: This bundled plug-in is supported for production use.
The hot folder import can be almost completely configured in the plug-in configuration file, all configuration properties are described in detail in this file.
Tip: In production environments it is advisable to place the hotfolder importFolderPath on a different local disk to prevent the system drive from running out of space.
Automatically fill metadata fields on import
It's optionally possible to automatically assign standard metadata values to imported files. You can define these values in the <folder_import>/field-mappings.xml file.
How it works
Note: Do not drop large amounts of files into the folder-import, in most of these cases it is better to use the bulk import. The folder-import module scans the entire hotfolder with each run. This will slow down the system when there are thousands of files in the hot folder.
Once you have set up the hotfolder in the configuration, Assets Server will periodically scan the folder for new content. Every time new items are found in the folder the importer will start processing them in batches (default is set to 50 files) until the folder is empty at which point it will resume its normal schedule. Internally the process works as follows:
- First the importer will move the items to a temporary folder - batchFolderPath - to make sure they aren't locked, are ready to be processed and to make sure they will not be imported several times.
- After moving, the items are imported into Assets Server.
- All files that were imported successfully are deleted, any remaining files (that failed to import) are moved to the failed folder - failedFolderPath.
- After a batch is processed, the importer will perform another scan on the hotfolder and take another batch to import. So you can deposit content at any time, the importer will pick them up.
- Files that could not be processed will be moved to the failed folder, the error that occurred will be added to the log.