AssetImporter
AssetImporter
This service creates new Asset entities based on string paths provided in the CSV
import format. The source files are resolved by joining the value of importExportOptions.importAssetsDir
with the asset path. This service is used internally by the Importer service.
Signature
class AssetImporter {
getAssets(assetPaths: string[], ctx?: RequestContext) => Promise<{ assets: Asset[]; errors: string[] }>;
}
getAssets
method
(assetPaths: string[], ctx?: RequestContext) => Promise<{ assets: Asset[]; errors: string[] }>
Creates Asset entities for the given paths, using the assetMap cache to prevent the creation of duplicates.