FileManager Class | ![]() |
Namespace: GleamTech.FileUltimate.AspNet.UI
The FileManager type exposes the following members.
Name | Description | |
---|---|---|
![]() | FileManager |
Initializes a new instance of the FileManager class.
|
![]() | FileManager(FileUltimateWebConfiguration) |
Initializes a new instance of the FileManager class with custom web configuration.
|
Name | Description | |
---|---|---|
![]() | ArchiveBrowsingEnabled |
Gets or sets a value that specifies whether browsing inside archive files (.zip etc.) like
regular folders should be enabled.
Default is true.
|
![]() | CheckboxSelectionEnabled |
Gets or sets a value that specifies whether "Item check boxes" mode should be forced regardless
of being detected as a touch device.
Default is false.
|
![]() | Chooser |
Gets or sets a value that specifies whether the component should be displayed as a file/folder chooser.
Default is false.
In chooser mode, "Choose" and "Cancel" buttons will be displayed at the bottom of the component
and double-clicking on a item of allowed type will choose that item instead of doing the default
action (download/explore).
|
![]() | ChooserMultipleSelection |
Gets or sets a value that specifies whether multiple item selection should be allowed in chooser mode.
Default is false.
|
![]() | ChooserType |
Gets or sets the item type that should be allowed to be chosen in chooser mode.
Default is File.
Possible values are File, Folder and FileOrFolder.
|
![]() | ClientEvents | Gets or sets the client-side event handlers. |
![]() | CollapseRibbon |
Gets or sets a value that specifies whether the ribbon (top toolbar pane) is displayed in collapsed mode.
Default is false.
|
![]() | DebugMode |
Gets or sets a value indicating whether to display detailed error messages for troubleshooting.
Exceptions will be displayed with stack trace, inner exceptions and data.
(Inherited from StatefulComponent.) |
![]() | DisplayLanguage |
Gets or sets the display (user interface) language of the file manager.
It is usually set as the two-letter language names like en, de, fr etc. as the bundled languages
are usually for general language names. However it can be also set to specific cultures like
en-US, de-DE, fr-FR etc. For example, if the property is set to a specific culture like
de-CH (German in Switzerland), the component will first look for the language file
FileUltimate-de-CH.xml and if the file is not found, it will load the general (fallback)
language file of that culture which is FileUltimate-de.xml.
If not set, the language file which matches the current UICulture of the host application will be loaded.
If there is no language file which matches the current UICulture or its fallback, then
the default language file FileUltimate.xml is loaded.
|
![]() | DisplayMode | Gets or sets a value indicating whether the component is rendered as InPlace (default), Panel, Window or Viewport. (Inherited from Component.) |
![]() | DocumentViewerEnabled |
Gets or sets a value that specifies whether viewer for document files should be enabled.
Default is true.
|
![]() | DownloadOnDoubleClick |
Gets or sets a value that specifies whether "Download" action should be triggered when you double-click on a file.
Default is false.
When not set, "Preview" action will be triggered and
if "Preview" permission is not allowed or the file type is not previewable by any of
the built-in viewers, then "Open" (open inline in browser or open locally) action will be triggered.
|
![]() | DownloadWithChunkedTransferThreshold |
Gets or sets the threshold to start using chunked downloading.
This property is only useful if you have problems downloading large files due to your environment
limitations (reverse proxy etc.). For example, Microsoft Forefront UAG can not parse http reponses
when content-length is larger than 2GB (throws HTTP 500 due to 32-bit integer limit).
By setting this property to 2GB, files upto 2GB will be sent with content-length set
(default download method) but files larger than 2GB will be sent without content-length
and with chunked-transfer encoding so that you can bypass UAG's limitation and successfully
download the files. The reason this setting is specified as a threshold is that default
download method (content-length set) is always better as it allows the browser to know
the whole file size thus show progress information. However with chunked-transfer encoding,
the browser will not know the whole file size so it will not be able to show progress information
but it will still be able to download the file as long as it receives the stream.
So users downloading files smaller than this threshold should not be punished with indeterminate
progress but also users downloading files larger than this threshold should still be able to
successfully download even there is no progress.
|
![]() | ExcludedExtensionsForPreview |
Gets or sets a comma-separated file extensions (e.g. "docx, jpg, mp4") to exclude from previewing.
"Preview" action for these file extensions will be disabled.
|
![]() | FormatLanguage |
Gets or sets the format language of the file manager.
Format language is used for the number and date/time formats.
It is usually set as the specific cultures like en-US, de-DE, fr-FR etc.
If not set, the current Culture of the host application will be used.
|
![]() | Height | Gets or sets the height of the component. (Inherited from Component.) |
![]() | Hidden |
Gets or sets a value indicating whether the component is displayed when page is loaded.
When set to false, the component can be displayed later on client-side manually.
For example, the component can be displayed via a button's click event.
(Inherited from Component.) |
![]() | Id |
Gets or sets the HTML id of the component.
Also a javascript variable with the same name is automatically defined and it can be used to access
the client-side implementation of the component.
If omitted, Id will be automatically set to the class name of this component (e.g camel-case className)
and if there are other instances on the same page, to className2 ... classNameX.
(Inherited from Component.) |
![]() | ImageThumbnailsEnabled |
Gets or sets a value that specifies whether thumbnails for image files should be displayed.
Default is true.
|
![]() | ImageViewerEnabled |
Gets or sets a value that specifies whether viewer for image files should be enabled.
Default is true.
|
![]() | InitialFolder |
Gets or sets the folder that should be selected and displayed initially.
The value should the full path of the folder specified in format [RootFolderName]:\Some\Folder.
When not set, the first root folder will be selected automatically.
|
![]() | MaxFileSizeToUpload |
Gets or sets the maximum allowed file size to upload.
If not set, there will be no size limit for upload.
0 (zero) also means unlimited.
|
![]() | MaxSizeToCompress |
Gets or sets the maximum allowed size to compress (per action).
This property can be used to prevent users creating large zip files (or other compressed archive files in future)
which is CPU intensive. It can be set in <Number> B/KB/MB/GB/TB format (eg. 1024 or 1024 B, 200 KB, 30 MB, 5 GB, 1 TB).
Note that this value is the uncompressed size for the action because it's not possible to determine
the compressed size before actually doing the compression.
If not set, there will be no size limit for compression.
|
![]() | MediaPlayerEnabled |
Gets or sets a value that specifies whether player for video and audio files should be enabled.
Default is true.
|
![]() | OpenInBrowserEnabled |
Gets or sets a value that specifies whether opening files in browser should be enabled.
Default is true.
|
![]() | PanelOptions | Gets or sets the panel options used for Panel mode. (Inherited from Component.) |
![]() | ProductInfoRendered | Gets or sets a value indicating whether product info/copyright comment is rendered in html. (Inherited from Component.) |
![]() | Resizable |
Gets or sets a value that specifies if the component can be resized when the user drags sides.
(Inherited from Component.) |
![]() | ResizeHandles |
Gets or sets a value that specifies the handles which can be used for resizing the component.
Default is South, East and SouthEast.
When using Window mode, set ResizeHandles
which overrides this property.
(Inherited from Component.) |
![]() | RootFolders |
Gets the collection of the root folders to display in the file manager.
|
![]() | ShowFileExtensions |
Gets or sets a value that specifies whether the extension part of the file names should be be displayed.
Default is false.
When this set to true, the file extension will be also editable in dialog boxes
when user is prompted (eg. on Rename and Add to Zip actions).
|
![]() | ShowFoldersPane |
Gets or sets a value that specifies whether the folders pane (left pane) is displayed.
Default is true.
|
![]() | ShowHiddenFilesAndFolders |
Gets or sets a value that specifies whether hidden files and subfolders should be displayed.
Default is false.
|
![]() | ShowRibbon |
Gets or sets a value that specifies whether the ribbon (top toolbar pane) is displayed.
Default is true.
|
![]() | ShowSystemFilesAndFolders |
Gets or sets a value that specifies whether system files and subfolders should be displayed.
Default is false.
|
![]() | ShowSystemTypeDescriptions |
Gets or sets a value that specifies whether file and folder type descriptions from the system's registry (eg. Microsoft Word Document) should be displayed.
Default is false.
If set to false, then simple but current language dependant type descriptions (eg. DOC File) will be shown.
If registry access is not be possible, even if this property is enabled, simple type descriptions will be shown.
|
![]() | SortRootFolders |
Gets or sets a value that specifies whether the root folders should be listed in alphabetically sorted order.
Default is false.
When not set, the root folders are listed in the original collection order.
|
![]() | StateId |
Gets or sets the state id of the component.
This is determined automatically when state is saved to session.
(Inherited from StatefulComponent.) |
![]() | UploadMethods |
Gets or sets a comma separated upload methods in priority order.
The default value is "Html5, Silverlight, Flash, Html4".
It's not recommended to change this property as the default order offers the best upload experience.
|
![]() | VideoThumbnailsEnabled |
Gets or sets a value that specifies whether thumbnails for video files should be displayed.
Default is true.
|
![]() | ViewLayout |
Gets or sets the initial view layout type for listing files and folders on the right pane.
Default is LargeIcons.
Possible values are ExtraLargeIcons, LargeIcons, MediumIcons, SmallIcons, Details and Tiles.
|
![]() | Width | Gets or sets the width of the component. (Inherited from Component.) |
![]() | WindowOptions | Gets or sets the windows options used for Window mode. (Inherited from Component.) |
Name | Description | |
---|---|---|
![]() | Compressed | Occurs after user compresses (zips) a file or folder in file manager. |
![]() | Compressing | Occurs before user compresses (zips) a file or folder in file manager. |
![]() | Copied | Occurs after user copies a file or folder in file manager. |
![]() | Copying | Occurs before user copies a file or folder in file manager. |
![]() | Created | Occurs after user creates a file or folder in file manager. |
![]() | Creating | Occurs before user creates a file or folder in file manager. |
![]() | Deleted | Occurs after user deletes a file or folder in file manager. |
![]() | Deleting | Occurs before user deletes a file or folder in file manager. |
![]() | Downloaded | Occurs after user downloads a file or folder in file manager. |
![]() | Downloading | Occurs before user downloads a file or folder in file manager. |
![]() | Expanded | Occurs after user expands a folder in file manager. |
![]() | Expanding | Occurs before user expands a folder in file manager. |
![]() | Extracted | Occurs after user extracts (unzips) a file or folder in file manager. |
![]() | Extracting | Occurs before user extracts (unzips) a file or folder in file manager. |
![]() | Failed | Occurs when an action in file manager fails. |
![]() | Listed | Occurs after user lists a folder in file manager. |
![]() | Listing | Occurs before user lists a folder in file manager. |
![]() | Moved | Occurs after user moves a file or folder in file manager. |
![]() | Moving | Occurs before user moves a file or folder in file manager. |
![]() | Previewed | Occurs after user previews a file or folder in file manager. |
![]() | Previewing | Occurs before user previews a file or folder in file manager. |
![]() | Renamed | Occurs after user renames a file or folder in file manager. |
![]() | Renaming | Occurs before user renames a file or folder in file manager. |
![]() | Uploaded | Occurs after user uploads a file or folder in file manager. |
![]() | Uploading | Occurs before user uploads a file or folder in file manager. |
@using GleamTech.AspNet.Mvc @using GleamTech.FileUltimate.AspNet.UI <!DOCTYPE html> @{ var fileManager = new FileManager { Width = 800, Height = 600, Resizable = true }; var rootFolder = new FileManagerRootFolder { Name = "A Root Folder", Location = "~/App_Data/RootFolder1" }; rootFolder.AccessControls.Add(new FileManagerAccessControl { Path = @"\", AllowedPermissions = FileManagerPermissions.Full }); fileManager.RootFolders.Add(rootFolder); } <html> <head> <title>File Manager</title> @this.RenderHead(fileManager) </head> <body> @this.RenderBody(fileManager) </body> </html>
Note that for ASP.NET Core, you also need to add and register GleamTech in Startup.cs, please see Using FileUltimate in an ASP.NET Core project.