Skip to main content

DefaultAssetNamingStrategy

DefaultAssetNamingStrategy

The default strategy normalizes the file names to remove unwanted characters and in the case of conflicts, increments a counter suffix.

Signature
class DefaultAssetNamingStrategy implements AssetNamingStrategy {
generateSourceFileName(ctx: RequestContext, originalFileName: string, conflictFileName?: string) => string;
generatePreviewFileName(ctx: RequestContext, sourceFileName: string, conflictFileName?: string) => string;
}

generateSourceFileName

method
(ctx: RequestContext, originalFileName: string, conflictFileName?: string) => string

generatePreviewFileName

method
(ctx: RequestContext, sourceFileName: string, conflictFileName?: string) => string