Class JJUploadArea
- Namespace
- JJMasterData.Core.UI.Components
- Assembly
- JJMasterData.Core.dll
public class JJUploadArea : AsyncComponent
- Inheritance
-
JJUploadArea
- Inherited Members
Constructors
JJUploadArea(IHttpContext, UploadAreaService, IEncryptionService, IRequestLengthService, IStringLocalizer<MasterDataResources>)
public JJUploadArea(IHttpContext httpContext, UploadAreaService uploadAreaService, IEncryptionService encryptionService, IRequestLengthService requestLengthService, IStringLocalizer<MasterDataResources> stringLocalizer)
Parameters
httpContext
IHttpContextuploadAreaService
UploadAreaServiceencryptionService
IEncryptionServicerequestLengthService
IRequestLengthServicestringLocalizer
IStringLocalizer<MasterDataResources>
Properties
AbortLabel
public string AbortLabel { get; set; }
Property Value
AllowedTypes
Allowed extension type, separated by comma. Default: * Example: txt,csv,log
public string AllowedTypes { get; set; }
Property Value
Remarks
On the systems file types are blocked like .exe .dll etc...
CancelLabel
public string CancelLabel { get; set; }
Property Value
CustomUploadAreaLabel
public string? CustomUploadAreaLabel { get; set; }
Property Value
EnableCopyPaste
public bool EnableCopyPaste { get; set; }
Property Value
EnableDragDrop
public bool EnableDragDrop { get; set; }
Property Value
ExtensionNotAllowedLabel
public string ExtensionNotAllowedLabel { get; set; }
Property Value
JsCallback
JS code to be executed after all server side uploads are completed.
public string JsCallback { get; set; }
Property Value
MaxFileSize
public long MaxFileSize { get; set; }
Property Value
MaxFiles
This property will be used only if Multiple is true.
public int MaxFiles { get; set; }
Property Value
Multiple
Allows simultaneous upload of files. Default: True
public bool Multiple { get; set; }
Property Value
ParallelUploads
How many server-side uploads can happen at the same time.
public int ParallelUploads { get; set; }
Property Value
ParentName
public string? ParentName { get; set; }
Property Value
QueryStringParams
QueryString parameters to be sended at async POST requests.
public Dictionary<string, string> QueryStringParams { get; }
Property Value
ShowFileSize
public bool ShowFileSize { get; set; }
Property Value
SizeErrorLabel
public string SizeErrorLabel { get; set; }
Property Value
Url
URL where the files are uploaded. If none is provided, they will be sended to the same page with a RouteContext.
public string? Url { get; set; }
Property Value
Methods
BuildResultAsync()
protected override Task<ComponentResult> BuildResultAsync()
Returns
GetFileUploadResultAsync(FormFileContent)
public Task<ComponentResult> GetFileUploadResultAsync(FormFileContent formFile)
Parameters
formFile
FormFileContent
Returns
GetMaxRequestLength()
public long GetMaxRequestLength()
Returns
GetQueryStringParams()
public string GetQueryStringParams()
Returns
Events
OnFileUploaded
Event fired when the file is posted.
public event EventHandler<FormUploadFileEventArgs>? OnFileUploaded
Event Type
OnFileUploadedAsync
Async event fired when the file is posted.
public event AsyncEventHandler<FormUploadFileEventArgs>? OnFileUploadedAsync