IUploadFileOptions interface

namespace: Serenity.ComponentModel   assemblySerenity.Net.Core

Upload options related to the file name and encoding

public interface IUploadFileOptions : IUploadOptions

Members

name description
CopyToHistory { get; } Should a copy of file placed in a special history folder on upload. This helps preserving old files on update.
DisplayFileName { get; } If you have no original name property but use original name in file name with {4} format parameter, set this to true to force the upload editor to show file name.
FilenameFormat { get; } Format of the file name like "ProductImage/{1:00000}/{0:00000000}_{2}". Parameter 0 is the row identity value, 1 is identity value / 1000, and 2 is a random string like 2cxs4bc, 3 is current date/time, 4 is original file name. You can also use the shortcut "ProductImage/" which is equivalent to the prior sample. If you don't specify this, it will default to something like Product/ProductImage/ which is generated by combining row class name and field name.
JsonEncodeValue { get; } Only useful for uploading multiple files. Specifies whether to JSON encode value. If your field is a string field set it to true.
OriginalNameProperty { get; } If you want to store original name of the file uploaded, set this to the name of another string field. Only used for single image uploads.

See Also