File Manager

File Manager is a Gramex app used to upload, download, rename, delete and annotate files within a Gramex application.

Usage

FileManager can be imported in a Gramex app as follows:

  import:
    filemanager:
      path: $GRAMEXAPPS/filemanager/gramex.yaml
      YAMLURL: $YAMLURL/filemanager/
  
This mounts the FileManager page at /filemanager/. For each DriveHandler endpoint configured in your Gramex app, the FileManager page shows a FormHandler table of files stored in that drive. This table can be used to:

FileManager Options

FileManager can be configured by using options under FILEMANAGER_KWARGS in gramex.yaml as follows:

  import:
    filemanager:
      path: $GRAMEXAPPS/filemanager/gramex.yaml
      YAMLURL: $YAMLURL/filemanager/
      FILEMANAGER_KWARGS:
        drives: ['drive1', 'drive2']              # Show only these drives in the FileManager page
        title: "MyAwesomeFileManager"             # Title of the FileManager page
        logo: $YAMLPATH/data/assets/gramener.png  # Logo for the FileManager page
        theme: ...                                # Bootstrap theme for the FileManager page.
  

Drive Handler

DriveHandler allows uploading, downloading, renaming, deletion and annotation of files in a Gramex application.

Usage

Use DriveHandler in Gramex app as follows: {% include 'drivehandler-snippet.html' %} This endpoint is a FormHandler that allows:

Embedding FileManager

Just like FormHandler, the FileManager component can be embedded in any <div> element, as follows: {% include 'filemanager-snippet.html' %}