Table of Contents

Class JJUploadArea

Namespace
JJMasterData.Core.UI.Components
Assembly
JJMasterData.Core.dll
public class JJUploadArea : AsyncComponent
Inheritance
JJUploadArea
Inherited Members

Constructors

JJUploadArea(IHttpContext, UploadAreaService, IEncryptionService, IStringLocalizer<MasterDataResources>)

public JJUploadArea(IHttpContext currentContext, UploadAreaService uploadAreaService, IEncryptionService encryptionService, IStringLocalizer<MasterDataResources> stringLocalizer)

Parameters

currentContext IHttpContext
uploadAreaService UploadAreaService
encryptionService IEncryptionService
stringLocalizer IStringLocalizer<MasterDataResources>

Properties

AbortLabel

public string AbortLabel { get; set; }

Property Value

string

AllowedTypes

Allowed extension type, separated by comma. Default: * Example: txt,csv,log

public string AllowedTypes { get; set; }

Property Value

string

Remarks

On the systems file types are blocked like .exe .dll etc...

CancelLabel

public string CancelLabel { get; set; }

Property Value

string

CustomUploadAreaLabel

public string? CustomUploadAreaLabel { get; set; }

Property Value

string

EnableCopyPaste

public bool EnableCopyPaste { get; set; }

Property Value

bool

EnableDragDrop

public bool EnableDragDrop { get; set; }

Property Value

bool

ExtensionNotAllowedLabel

public string ExtensionNotAllowedLabel { get; set; }

Property Value

string

JsCallback

JS code to be executed after all server side uploads are completed.

public string JsCallback { get; set; }

Property Value

string

MaxFileSize

public int MaxFileSize { get; set; }

Property Value

int

MaxFiles

This property will be used only if Multiple is true.

public int MaxFiles { get; set; }

Property Value

int

Multiple

Allows simultaneous upload of files. Default: True

public bool Multiple { get; set; }

Property Value

bool

ParallelUploads

How many server-side uploads can happen at the same time.

public int ParallelUploads { get; set; }

Property Value

int

ParentName

public string? ParentName { get; set; }

Property Value

string

QueryStringParams

QueryString parameters to be sended at async POST requests.

public Dictionary<string, string> QueryStringParams { get; }

Property Value

Dictionary<string, string>

ShowFileSize

public bool ShowFileSize { get; set; }

Property Value

bool

SizeErrorLabel

public string SizeErrorLabel { get; set; }

Property Value

string

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

string

Methods

BuildResultAsync()

protected override Task<ComponentResult> BuildResultAsync()

Returns

Task<ComponentResult>

GetFileUploadResultAsync(FormFileContent)

public Task<ComponentResult> GetFileUploadResultAsync(FormFileContent formFile)

Parameters

formFile FormFileContent

Returns

Task<ComponentResult>

GetMaxRequestLength()

public static int GetMaxRequestLength()

Returns

int

Remarks

To change this in .NET Framework, change web.config in system.web/httpRuntime Measured in bytes

GetQueryStringParams()

public string GetQueryStringParams()

Returns

string

Events

OnFileUploaded

Event fired when the file is posted.

public event EventHandler<FormUploadFileEventArgs>? OnFileUploaded

Event Type

EventHandler<FormUploadFileEventArgs>

OnFileUploadedAsync

Async event fired when the file is posted.

public event AsyncEventHandler<FormUploadFileEventArgs>? OnFileUploadedAsync

Event Type

AsyncEventHandler<FormUploadFileEventArgs>