Table of Contents

Class JJUploadView

Namespace
JJMasterData.Core.UI.Components
Assembly
JJMasterData.Core.dll

Form responsible for managing files in a directory

public class JJUploadView : AsyncComponent
Inheritance
JJUploadView
Inherited Members

Examples

The output will look like this:

Constructors

JJUploadView(IHttpContext, IComponentFactory, IEncryptionService, IStringLocalizer<MasterDataResources>, ILoggerFactory)

public JJUploadView(IHttpContext currentContext, IComponentFactory componentFactory, IEncryptionService encryptionService, IStringLocalizer<MasterDataResources> stringLocalizer, ILoggerFactory loggerFactory)

Parameters

currentContext IHttpContext
componentFactory IComponentFactory
encryptionService IEncryptionService
stringLocalizer IStringLocalizer<MasterDataResources>
loggerFactory ILoggerFactory

Properties

AutoSave

Always apply changes to the file system. If false, keep it in the memory. (The default value is true.)

public bool AutoSave { get; set; }

Property Value

bool

DeleteAction

public ScriptAction DeleteAction { get; }

Property Value

ScriptAction

DownloadAction

public UrlRedirectAction DownloadAction { get; }

Property Value

UrlRedirectAction

FolderPath

Full Directory Path. (Optional) If the path is not given, all files will be stored in the session.

public string FolderPath { get; set; }

Property Value

string

Remarks

Example: C:\temp\files\ (Windows) or /tmp/Files (Linux)

GridView

public JJGridView GridView { get; }

Property Value

JJGridView

Icon

public IconType? Icon { get; set; }

Property Value

IconType?

IsCollapseExpandedByDefault

public bool IsCollapseExpandedByDefault { get; set; }

Property Value

bool

JsCallback

public string JsCallback { get; set; }

Property Value

string

RenameAction

public ScriptAction RenameAction { get; set; }

Property Value

ScriptAction

RouteContext

protected RouteContext RouteContext { get; }

Property Value

RouteContext

ShowAddFiles

public bool ShowAddFiles { get; set; }

Property Value

bool

SubTitle

public string SubTitle { get; set; }

Property Value

string

Title

public string Title { get; set; }

Property Value

string

TitleSize

public HeadingSize TitleSize { get; set; }

Property Value

HeadingSize

UploadArea

public JJUploadArea UploadArea { get; }

Property Value

JJUploadArea

ViewGallery

public bool ViewGallery { get; set; }

Property Value

bool

Methods

BuildResultAsync()

protected override Task<ComponentResult> BuildResultAsync()

Returns

Task<ComponentResult>

ClearMemoryFiles()

public void ClearMemoryFiles()

CreateFile(FormFileContent)

public void CreateFile(FormFileContent file)

Parameters

file FormFileContent

Disable()

Disable all actions, except the download.

public void Disable()

GetDeleteFileResult(string)

public ComponentResult GetDeleteFileResult(string fileName)

Parameters

fileName string

Returns

ComponentResult

GetDownloadFileResult(string)

public FileComponentResult GetDownloadFileResult(string fileName)

Parameters

fileName string

Returns

FileComponentResult

GetFiles()

public List<FormFileInfo> GetFiles()

Returns

List<FormFileInfo>

GetUploadViewResult()

public Task<ComponentResult> GetUploadViewResult()

Returns

Task<ComponentResult>

RenameFile(string, string)

public void RenameFile(string currentName, string newName)

Parameters

currentName string
newName string

SaveMemoryFiles(string)

public void SaveMemoryFiles(string folderPath)

Parameters

folderPath string

Events

OnBeforeCreateFile

public event EventHandler<FormUploadFileEventArgs> OnBeforeCreateFile

Event Type

EventHandler<FormUploadFileEventArgs>

OnBeforeDeleteFile

public event EventHandler<FormDeleteFileEventArgs> OnBeforeDeleteFile

Event Type

EventHandler<FormDeleteFileEventArgs>

OnBeforeDownloadFile

public event EventHandler<FormDownloadFileEventArgs> OnBeforeDownloadFile

Event Type

EventHandler<FormDownloadFileEventArgs>

OnBeforeRenameFile

public event EventHandler<FormRenameFileEventArgs> OnBeforeRenameFile

Event Type

EventHandler<FormRenameFileEventArgs>

See Also