# GM - File Explorer

## **Documentation**

**GM - File Explorer** component is used to display the list of files related to a specific record ,It has the flexibility to change the display format according to the preference, such as Table, Tree, Gallery, or Carousel. Additionally, it has the ability to perform various actions on the files, including downloading and deleting them. This allows to manage and organize the attached files conveniently within the system.&#x20;

**Use case:** Display the  related files to an account.

<figure><img src="/files/jCRTGJTLDh5iYLyIRnp2" alt=""><figcaption></figcaption></figure>

{% columns fullWidth="true" %}
{% column %}

1. Paste
2. Cut
3. Copy
4. Download
5. Delete
6. Carousel
   {% endcolumn %}

{% column valign="middle" %}
7\. Tree
8\. Table
9\. Gallery
10\. Reload
11\. Search Box

{% endcolumn %}
{% endcolumns %}

## **Specification**

<table data-full-width="true"><thead><tr><th>Property</th><th>Type</th><th width="396">Description</th></tr></thead><tbody><tr><td>Record Id</td><td>String</td><td>recordId to use. Keep this empty if you want to use the current record.</td></tr><tr><td>Custom Label</td><td>String</td><td>Set the custom label. Keep it empty to use the default value.</td></tr><tr><td>Default View</td><td>String</td><td>Set the default view (table|tree|gallery|carousel).</td></tr><tr><td>Enable Delete</td><td>Boolean</td><td>Check this option if you wish to allow the end-user to delete files.</td></tr><tr><td>Enable Hard Delete</td><td>Boolean</td><td>Check this option if you want to hard delete files</td></tr><tr><td>Enable Copy/Paste</td><td>Boolean</td><td>Check this option if you wish to allow the end-user to copy/paste files from a record to another one.</td></tr><tr><td>Hide Topics</td><td>Boolean</td><td>Check this option if you want to hide topics.</td></tr><tr><td>Enable Search By Topics</td><td>Boolean</td><td>Check this option if you wish to enable the search by Topic.</td></tr><tr><td>Enable Update Topics</td><td>Boolean</td><td>Check this option if you wish to enable Topics update. This option is available only in the carousel view.</td></tr><tr><td>Collapse Carousel Split View</td><td>Boolean</td><td>Check this option if you want to collapse the carousel split view.</td></tr><tr><td>Disable Salesforce Upload</td><td>Boolean</td><td>Check this option to disable the file upload functionality to Salesforce.</td></tr><tr><td>Disable Download</td><td>Boolean</td><td>Check this option to prevent users from downloading files in the explorer.</td></tr><tr><td>Show Border</td><td>Boolean</td><td>Check this option if you want to show border.</td></tr><tr><td>Filter</td><td>String</td><td>JSON string to define filter criteria. Don’t forget __c for custom fields. See <a href="/pages/-MEstkhme84gnGFcsCxP#specification">GM - RelatedList Grid</a></td></tr><tr><td>Accepted Formats</td><td>String</td><td>Comma-separated list of file extensions that can be uploaded in the format .ext, such as .pdf,.jpg,.png.</td></tr><tr><td>Content Library</td><td>String</td><td>Content Library Name. The library is optional.  When enabled, this option filters files to display only those within a specified library. Uploaded files will also be moved to that library. This feature is useful for organizing files by business unit, for example contracting, finance, hr...</td></tr><tr><td>Folder Name</td><td>String</td><td>Upload Folder Name. If a folder name is specified, uploaded files will be moved to that folder. Otherwise, this step is optional.</td></tr><tr><td>Actions</td><td>String</td><td>JSON string to initialize the list of available mass actions.</td></tr><tr><td>Height</td><td>Integer</td><td>Sets the height of the file explorer container.</td></tr><tr><td>Inline Preview</td><td>Boolean</td><td>Check this option to enable an inline preview of selected files.</td></tr><tr><td>Preview Position</td><td>String</td><td>Position of the inline preview (top|bottom|right|left).</td></tr><tr><td>Preview Height</td><td>Integer</td><td>Sets the height for the inline preview section.</td></tr><tr><td>Preview Width</td><td>Integer</td><td>Sets the width for the inline preview section.</td></tr></tbody></table>

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="fileExplorerLWC.js-meta.xml" %}
{% code fullWidth="true" %}

```xml
<?xml version="1.0" encoding="UTF-8" ?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>64.0</apiVersion>
    <isExposed>true</isExposed>
    <masterLabel>GM - File Explorer</masterLabel>
    <description>GM - File Explorer</description>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
        <target>lightningCommunity__Page</target>
        <target>lightningCommunity__Default</target>
    </targets>
    <targetConfigs>
        <targetConfig targets="lightning__RecordPage,lightning__AppPage,lightning__HomePage">
            <property
                name="recordId"
                type="String"
                label="recordId"
                description="recordId to use. Keep this empty if you want to use the current record"
            />

            <property
                name="customLabel"
                type="String"
                label="Custom Label"
                description="Set the custom label. Keep it empty to use the default value"
            />

            <property
                name="defaultView"
                type="String"
                label="Default View"
                description="Set the default view (table|tree|gallery|carousel)"
            />

            <property
                name="canDelete"
                type="Boolean"
                label="Enable Delete"
                description="Check this option if you want to delete links"
            />

            <property
                name="canHardDelete"
                type="Boolean"
                label="Enable Hard Delete"
                description="Check this option if you want to hard delete files"
            />

            <property
                name="canCopyPaste"
                type="Boolean"
                label="Enable Copy/Paste"
                description="Check this option if you want to copy/paste"
            />

            <property
                name="hideTopics"
                type="Boolean"
                label="Hide Topics"
                description="Check this option if you want to hide topics"
            />

            <property
                name="canSearchByTopics"
                type="Boolean"
                label="Enable Search By Topics"
                description="Check this option if you want to search by topics"
            />

            <property
                name="canUpdateTopics"
                type="Boolean"
                label="Enable Update Topics"
                description="Check this option if you want to update topics"
            />

            <property
                name="collapseSplitView"
                type="Boolean"
                label="Collapse Carousel Split View"
                description="Check this option if you want to collapse the carousel split view"
            />

            <property
                name="disableSfUpload"
                type="Boolean"
                label="Disable Salesforce Upload"
                description="Check this option if you want to disable upload to Salesforce"
            />

            <property
                name="disableDownload"
                type="Boolean"
                label="Disable Download"
                description="Check this option to disable file download in all views and preview modes"
            />

            <property
                name="showBorder"
                type="Boolean"
                label="Show Border"
                description="Check this option if you want to show Border."
            />

            <property
                name="jsonFilter"
                type="String"
                label="Filter"
                description="Json string to define filter criteria"
            />

            <property
                name="accept"
                type="String"
                label="Accepted Formats"
                description="Comma-separated list of file extensions that can be uploaded in the format .ext, such as .pdf,.jpg,.png."
            />

            <property
                name="library"
                type="String"
                label="Content Library"
                description="Content Library Name. The library is optional."
            />

            <property
                name="folder"
                type="String"
                label="Folder Name"
                description="Upload Folder Name. The folder name is optional."
            />

            <property
                name="jsonActions"
                type="String"
                label="Actions"
                description="Json string to initialize the list of available actions like Add file from S3"
            />

            <property
                name="height"
                type="Integer"
                label="Height"
                description="Set the container height. Applicable for Gallery/List/Tree view"
            />

            <property
                name="enhancedPreview"
                type="Boolean"
                label="Enhanced Preview"
                description="Check this option to enable enhanced preview"
            />

            <property
                name="inlinePreview"
                type="Boolean"
                label="Inline Preview"
                description="Check this option to enable inline preview. Applicable for Gallery/List/Tree view"
            />

            <property
                name="previewPosition"
                type="String"
                label="Inline Preview Position"
                description="Inline preview position(top|bottom|right|left). Applicable for Gallery/List/Tree view"
            />

            <property
                name="previewHeight"
                type="Integer"
                label="Inline Preview Height"
                description="Inline preview height(px). Applicable for Gallery/List/Tree view"
            />

            <property
                name="previewWidth"
                type="Integer"
                label="Inline Preview Width"
                description="Inline preview width(%). Applicable for Gallery/List/Tree view"
            />

            <supportedFormFactors>
                <supportedFormFactor type="Large" />
                <supportedFormFactor type="Small" />
            </supportedFormFactors>
        </targetConfig>
        <targetConfig targets="lightningCommunity__Default">
            <property
                name="recordId"
                type="String"
                label="recordId"
                description="recordId to use. Keep this empty if you want to use the current record"
            />

            <property
                name="customLabel"
                type="String"
                label="Custom Label"
                description="Set the custom label. Keep it empty to use the default value"
            />

            <property
                name="defaultView"
                type="String"
                label="Default View"
                description="Set the default view (table|tree|gallery|carousel)"
            />

            <property
                name="canDelete"
                type="Boolean"
                label="Enable Delete"
                description="Check this option if you want to delete"
            />

            <property
                name="canCopyPaste"
                type="Boolean"
                label="Enable Copy/Paste"
                description="Check this option if you want to copy/paste"
            />

            <property
                name="hideTopics"
                type="Boolean"
                label="Hide Topics"
                description="Check this option if you want to hide topics"
            />

            <property
                name="canSearchByTopics"
                type="Boolean"
                label="Enable Search By Topics"
                description="Check this option if you want to search by topics"
            />

            <property
                name="canUpdateTopics"
                type="Boolean"
                label="Enable Update Topics"
                description="Check this option if you want to update topics"
            />

            <property
                name="collapseSplitView"
                type="Boolean"
                label="Collapse Carousel Split View"
                description="Check this option if you want to collapse the carousel split view"
            />

            <property
                name="disableSfUpload"
                type="Boolean"
                label="Disable Salesforce Upload"
                description="Check this option if you want to disable upload to Salesforce"
            />

            <property
                name="disableDownload"
                type="Boolean"
                label="Disable Download"
                description="Check this option to disable file download in all views and preview modes"
            />

            <property
                name="showBorder"
                type="Boolean"
                label="Show Border"
                description="Check this option if you want to show Border."
            />

            <property
                name="jsonFilter"
                type="String"
                label="Filter"
                description="Json string to define filter criteria"
            />

            <property
                name="accept"
                type="String"
                label="Accepted Formats"
                description="Comma-separated list of file extensions that can be uploaded in the format .ext, such as .pdf,.jpg,.png"
            />

            <property
                name="library"
                type="String"
                label="Content Library"
                description="Content Library Name. The library is optional."
            />

            <property
                name="folder"
                type="String"
                label="Folder Name"
                description="Upload Folder Name. The folder name is optional."
            />

            <property
                name="jsonActions"
                type="String"
                label="Actions"
                description="Json string to initialize the list of available actions like Add file from S3"
            />

            <property
                name="height"
                type="Integer"
                label="Height"
                description="Set the container height. Applicable for Gallery/List/Tree view"
            />

            <property
                name="enhancedPreview"
                type="Boolean"
                label="Enhanced Preview"
                description="Check this option to enable enhanced preview"
            />

            <property
                name="inlinePreview"
                type="Boolean"
                label="Inline Preview"
                description="Check this option to enable inline preview. Applicable for Gallery/List/Tree view"
            />

            <property
                name="previewPosition"
                type="String"
                label="Inline Preview Position"
                description="Inline preview position(top|bottom|right|left). Applicable for Gallery/List/Tree view"
            />

            <property
                name="previewHeight"
                type="Integer"
                label="Inline Preview Height"
                description="Inline preview height(px). Applicable for Gallery/List/Tree view"
            />

            <property
                name="previewWidth"
                type="Integer"
                label="Inline Preview Width"
                description="Inline preview width(%). Applicable for Gallery/List/Tree view"
            />
        </targetConfig>
    </targetConfigs>
</LightningComponentBundle>

```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gridmate.io/package-reference/components-library/gm-file-explorer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
