BaseUploadEditorAttribute class
namespace: Serenity.ComponentModel assembly: Serenity.Net.Core
Sets editor type as "ImageUpload", which only allows image files. Make sure you use this attribute in Row.cs, not Form.cs as the image upload behavior only works if it is in the row, otherwise your files will stay in the temporary directory.
[AttributeUsage(AttributeTargets.All)]
public abstract class BaseUploadEditorAttribute : CustomEditorAttribute, IUploadEditor,
IUploadFileConstraints, IUploadFileOptions, IUploadImageConstraints, IUploadImageOptions
| parameter | description |
|---|---|
| editorType | Type of the editor. |
Public Members
| name | description |
|---|---|
| AllowedExtensions { get; set; } | |
| AllowNonImage { get; set; } | |
| CopyToHistory { get; set; } | |
| DisableDefaultBehavior { get; set; } | |
| DisplayFileName { get; set; } | |
| FilenameFormat { get; set; } | |
| IgnoreEmptyImage { get; set; } | |
| IgnoreExtensionMismatch { get; set; } | |
| IgnoreInvalidImage { get; set; } | |
| ImageExtensions { get; set; } | |
| abstract IsMultiple { get; } | |
| JsonEncodeValue { get; set; } | |
| MaxHeight { get; set; } | |
| MaxSize { get; set; } | |
| MaxWidth { get; set; } | |
| MinHeight { get; set; } | |
| MinSize { get; set; } | |
| MinWidth { get; set; } | |
| OriginalNameProperty { get; set; } | |
| ScaleBackColor { get; set; } | |
| ScaleHeight { get; set; } | |
| ScaleMode { get; set; } | |
| ScaleQuality { get; set; } | |
| ScaleSmaller { get; set; } | |
| ScaleWidth { get; set; } | |
| ThumbBackColor { get; set; } | |
| ThumbHeight { get; set; } | |
| ThumbMode { get; set; } | |
| ThumbQuality { get; set; } | |
| ThumbSizes { get; set; } | |
| ThumbWidth { get; set; } | |
| UploadIntent { get; set; } |
Protected Members
| name | description |
|---|---|
| BaseUploadEditorAttribute(…) | Sets editor type as "ImageUpload", which only allows image files. Make sure you use this attribute in Row.cs, not Form.cs as the image upload behavior only works if it is in the row, otherwise your files will stay in the temporary directory. |
Remarks
Initializes a new instance of the BaseUploadEditorAttribute class.
See Also
- class CustomEditorAttribute
- interface IUploadEditor
- interface IUploadFileConstraints
- interface IUploadFileOptions
- interface IUploadImageConstraints
- interface IUploadImageOptions
- Source: BaseUploadEditorAttribute.cs