namespace Smartstore.WebApi.Client.Models { public enum DuplicateFileHandling { ThrowError, Overwrite, Rename } /// /// Represents file upload data to be used for multipart form data. /// [Serializable] public class FileUploadModel { /// /// Paths of files to upload. /// public List Files { get; set; } = new(); /// /// Any custom properties to be added to multipart form data. Examples: /// Delete existing import files: deleteFiles = true /// Start import: startImport = true /// public Dictionary CustomProperties { get; set; } = new(); [Serializable] public class FileModel { /// /// File identifier for updating files. /// public int Id { get; set; } /// /// Absolute local path of file to be uploaded. /// public string LocalPath { get; set; } /// /// Media service path in shop. /// public string Path { get; set; } /// /// Whether the file in shop is marked as transient. /// public bool IsTransient { get; set; } = true; /// /// Duplicate file handling. /// public DuplicateFileHandling DuplicateFileHandling { get; set; } = DuplicateFileHandling.ThrowError; } } }