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
IHttpContextcomponentFactory
IComponentFactoryencryptionService
IEncryptionServicestringLocalizer
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
DeleteAction
public ScriptAction DeleteAction { get; }
Property Value
DownloadAction
public UrlRedirectAction DownloadAction { get; }
Property Value
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
Remarks
Example: C:\temp\files\ (Windows) or /tmp/Files (Linux)
GridView
public JJGridView GridView { get; }
Property Value
Icon
public IconType? Icon { get; set; }
Property Value
IsCollapseExpandedByDefault
public bool IsCollapseExpandedByDefault { get; set; }
Property Value
JsCallback
public string JsCallback { get; set; }
Property Value
RenameAction
public ScriptAction RenameAction { get; set; }
Property Value
RouteContext
protected RouteContext RouteContext { get; }
Property Value
ShowAddFiles
public bool ShowAddFiles { get; set; }
Property Value
SubTitle
public string SubTitle { get; set; }
Property Value
Title
public string Title { get; set; }
Property Value
TitleSize
public HeadingSize TitleSize { get; set; }
Property Value
UploadArea
public JJUploadArea UploadArea { get; }
Property Value
ViewGallery
public bool ViewGallery { get; set; }
Property Value
Methods
BuildResultAsync()
protected override Task<ComponentResult> BuildResultAsync()
Returns
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
GetDownloadFileResult(string)
public FileComponentResult GetDownloadFileResult(string fileName)
Parameters
fileName
string
Returns
GetFiles()
public List<FormFileInfo> GetFiles()
Returns
GetUploadViewResult()
public Task<ComponentResult> GetUploadViewResult()
Returns
RenameFile(string, string)
public void RenameFile(string currentName, string newName)
Parameters
SaveMemoryFiles(string)
public void SaveMemoryFiles(string folderPath)
Parameters
folderPath
string
Events
OnBeforeCreateFile
public event EventHandler<FormUploadFileEventArgs> OnBeforeCreateFile
Event Type
OnBeforeDeleteFile
public event EventHandler<FormDeleteFileEventArgs> OnBeforeDeleteFile
Event Type
OnBeforeDownloadFile
public event EventHandler<FormDownloadFileEventArgs> OnBeforeDownloadFile
Event Type
OnBeforeRenameFile
public event EventHandler<FormRenameFileEventArgs> OnBeforeRenameFile