Table of Contents
< All Topics
Print

Files, Folders & Resources

Files

/#dashboard:files

Gnosis Files provides a simple folder structure for storing various files for the Gnosis Application.

Access to folder content depends on the User’s Role. Some folders are accessible by Developers, others by Administrators only, and some by End Users.

New Folder

Click the New Folder toolbar button to open the New Folder dialog.

A new folder will be created as a sub-folder in the selected folder. If no folder is chosen, it will be a root folder.

The new folder name can specify a sub-folder with a slash (/) delimiter.

New File

Click the New File toolbar button to open the New File dialog.

Enter a file name, including an extension. The new file is created in the root folder or the selected folder.

Upload File

Click the Upload toolbar button to open the Upload File dialog.

Click the browse button to select the local file to upload.

The file will be uploaded to the specified folder. Otherwise, the uploaded file replaces the file chosen.

Download File

Click the Download toolbar button to download the selected file. Otherwise, a zip file is downloaded for the files in the specified folder.

File Preview and Editor

To the right of the Folder tree is the File Preview.

  • The Preview will list the sub-folders for the selected folder.
  • Render the image for selected image files.
  • Show a PDF viewer for Office and PDF files. And a simple text editor for text files.

Gnosis Folders

The following are the reserved folders for the Gnosis Application and the Roles required for access.

Admin folder

The /admin folder is accessible to Administrators only. The folder is a place to put files the Administrator wants to save for their eyes only.

Commands folder

The /commands folder contains Task Gnosis Scripts .gs files. It is accessible to both Administrators and Developers.

Functions folder

The /functions folder contains Gnosis Script .gs files and custom Gnosis Script functions. It is accessible to both Administrators and Developers.

Internal folder

The /internal folder is accessible to developers but not remotely.

Locale folder

The /locale folder is for localization locale.js files. The folder is accessible to both Administrators and Developers.

Overrides folder

The /overrides folder is used to override the ExtJS client. The folder is accessible to both Administrators and Developers.

Pages folder

The /pages folder is for Gnosis Scripts .gshtml files as custom pages. The folder is accessible to both Administrators and Developers.

Releases folder

The /releases folder is used for ???

Resources folder

The /resources folder contains images, fonts, etc. It is accessible to Developers and Administrators, but only the image files are accessible to the admin.

Styles

The /styles folder is for CSS files. The folder is accessible to Administrators only.

Templates folder

The /templates folder is Gnosis Scripts .gshtml files as templates. The folder is accessible to both Administrators and Developers.

/template/documentation

The documentation folder contains the templates for the Solution Documentation tool.

/template/mail

The mail folder contains the email templates for the Gnosis Application.

Users folders

User!{UserId} is accessible by the user by the UserId.

Solution folders

Folders named Solution!{SolutionName} are accessible to Developers and are used ???

File Storage

The Document Property Type stores a document as a property on an Item. It’s like a document attachment to the Item. There are several ways to store the documents for the Gnosis Application.

The default is to store documents in the Gnosis database. However, Gnosis File Storage can be configured to store documents in AWS S3, Google Drive, Dropbox, or an SFTP server.

AWS S3 File Storage

To store documents in an AWS S3 bucket, set the FileStorage/BaseUrl configuration settings to the s3:// protocol. Following standard protocols, you can include the S3 Access and Secret Keys in the URL.

/#dashboard:config
/FileStorage/BaseUrl = s3://{access-key}:{secret-key}@{bucket-name}/{path}

Alternatively, the credentials can be omitted when the keys are set in the Gnosis Configuration Settings.

/#dashboard:config
/FileStorage/BaseUrl = s3://{bucket-name}/{path}

In addition, you need to set these configuration settings:

AWS Access Key

Set the Amazon/AccessKey configuration setting to the AWS Access Key value.

AWS Secret

Set the Amazon/Secret configuration setting to the AWS Access Secret value.

AWS S3 Region Endpoint

Set the Amazon/S3/RegionEndpoint configuration setting to the AWS S3 region.

SFTP File Store

To store documents on an FTP server, set the FileStorage/BaseUrl configuration setting to the sftp:// protocol. Following standard protocols, you can include the username and password in the URL. The hostname must be in lowercase.

/#dashboard:config
/FileStorage/BaseUrl = sftp://{username:password@hostname}/{path}

Alternatively, the credentials can be omitted when set in the Gnosis Configuration Settings. A configuration key name groups the username and password. Replace the credentials with the configuration key name in the URL.

/#dashboard:config
/FileStorage/BaseUrl = sftp://{configuration-key}@{hostname}/{path}

In addition, you need to set these configuration settings:

SFTP User

Set the SFTP/{configuration-key}/User configuration setting to the username. The configuration key is any name you want. It is the configuration key name used in the URL.

SFTP Password

Set the SFTP/{configuration-key}/Password configuration setting to the user password. The configuration key is any name you want. It is the configuration key name used in the URL.

Dropbox File Storage

Set the FileStorage/BaseUrl value with the dropbox:// protocol to store documents on a Dropbox server. Specify a configuration key name in the URL.

The configuration key is a hostname URL.

/#dashboard:config
/FileStorage/BaseUrl = dropbox://{configuration-key}/{path}

In addition, you need to set these configuration settings:

Dropbox Access Token

Set the /Dropbox/{configuration-key}/AccessToken configuration setting to the Dropbox Access Token. The configuration key is any name you want. It is the configuration key name used in the URL.

/#dashboard:config
/FileStorage/BaseUrl = dropbox:///{path}?accessToken={access-token}

Alternatively, the Access Token can be omitted if set in the Gnosis Configuration Settings.

/#dashboard:config
/FileStorage/BaseUrl = dropbox:///{path}

In addition, you need to set these configuration settings:

Dropbox Access Token

Set the /Dropbox/AccessToken configuration for the Dropbox Access Token.

Google File Storage

To store documents in Google Drive, set the /FileStorage/BaseUrl configuration setting to the gdrive:// protocol.

/#dashboard:config
/FileStorage/BaseUrl = gdrive://{configuration-key}/{path}

Note that the URL gdrive://gnosis is the same as gdrive:/// because gnosis is the default configuration key name.

Use the gdrives:// protocol for Google Teams drives.

/#dashboard:config
/FileStorage/BaseUrl = gdrives://{configuration-key}/{path}

In addition, you need to configure the additional configuration settings:

Google Drive Key File

Set the /Google/Drive/{configuration-key}/KeyFile configuration setting to the Google Drive Key file name saved in the Gnosis Files /admin folder. To obtain a Google Drive Key file, create a Google App from the Google Console and create credentials. This will allow you to download the credentials in JSON format one time.

Set the configuration key name to gnosis, and the FileStorage/BaseUrl can be simplified as gdrive:///{path}.

Google Drive Timeout

/#dashboard:config
/Google/Drive/{configuration-key}/Timeout = 100

Set the /Google/Drive/{configuration-key}/Timeout configuration to the timeout value.

Google Drive Impersonate

/#dashboard:config
/Google/Drive/{configuration-key}/Impersonate = user@email.com

Set the /Google/Drive/{configuration-key}/Impersonate configuration setting to the Google user.

File Functions

In addition to saving files in Item Document properties, files can be saved to a URL, which can be any of the FileStorage locations. So, even if the Item Document property files are stored in one location, it is possible to store other files in any other location independently.

For example, the FileStoreage for Item Documents stores files in the Gnosis Database, while large videos are saved to an S3 bucket explicitly using Gnosis Script and the SaveFile() function.

See the Resource Functions documentation for the complete set of File functions.