# file-manager-api

> File manager without navigation pane, with toggles for toolbar, file extensions and thumbnails.

**Framework:** vue  **Component:** FileManager  **Variant:** api

## Get this item

**If you are an agent, fetch the JSON.** Source is inlined, so one request is enough and no tooling is required:

```
GET https://ai.syncfusion.com/r/vue/file-manager-api.json
```

**Install Package(s)**

```bash
npm install @syncfusion/ej2-vue-filemanager @syncfusion/ej2-vue-buttons @syncfusion/ej2-vue-dropdowns
```

**Notes**

- Syncfusion release: 2026 Volume 3 (v35.1.37)
- The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md

## Source files

### src/components/file-manager-api/FileManager.vue

```vue
<template>
  <div class="file-api">
    <div class="col-lg-8 control-section">
      <div class="sample-container">
        <ejs-filemanager
          id="file"
          ref="fileObject"
          :ajaxSettings="ajaxSettings"
          :view="view"
          :navigationPaneSettings="navigationPaneSettings"
          :toolbarSettings="toolbarSettings"
          :contextMenuSettings="contextMenuSettings"
          :enableRangeSelection="enableRangeSelection"
        />
      </div>
    </div>
    <div class="col-lg-4 property-section">
      <div id="property" title="Properties">
        <table id="property" title="Properties">
          <tbody>
            <tr id="rangeSelectionRow">
              <td style="width: 55%;">
                <div class="checkboxElement">Enable Range Selection</div>
              </td>
              <td style="width: 45%; padding-right: 10px;">
                <ejs-checkbox id="rangeSelection" :checked="true" :change="selectionChange" />
              </td>
            </tr>
            <tr>
              <td style="width: 55%;">
                <div class="checkboxElement">Toolbar</div>
              </td>
              <td style="width: 45%; padding-right: 10px;">
                <ejs-checkbox id="toolbar" :checked="true" :change="toolbarChange" />
              </td>
            </tr>
            <tr>
              <td style="width: 55%;">
                <div class="checkboxElement">Show File Extension</div>
              </td>
              <td style="width: 45%; padding-right: 10px;">
                <ejs-checkbox id="fileExtension" :checked="true" :change="fileExtensionChange" />
              </td>
            </tr>
            <tr>
              <td style="width: 55%;">
                <div class="checkboxElement">Show Thumbnail</div>
              </td>
              <td style="width: 45%; padding-right: 10px;">
                <ejs-checkbox id="thumbnail" :checked="true" :change="thumbnailChange" />
              </td>
            </tr>
            <tr>
              <td style="width: 55%;">
                <div class="checkboxElement">Disable Toolbar Item</div>
              </td>
              <td style="width: 45%; padding-left: 10px;">
                <ejs-dropdownlist
                  ref="disableDropDownList"
                  id="disable"
                  :dataSource="items"
                  placeholder="Select item"
                  :change="onDisableItemChange"
                />
              </td>
            </tr>
            <tr>
              <td style="width: 55%;">
                <div class="checkboxElement">Enable Toolbar Item</div>
              </td>
              <td style="width: 45%; padding-left: 10px;">
                <ejs-dropdownlist
                  ref="enableDropDownList"
                  id="enable"
                  :dataSource="items"
                  placeholder="Select item"
                  :change="onEnableItemChange"
                />
              </td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
  </div>
</template>

<script lang="ts">
import { FileManagerComponent, NavigationPane, Toolbar, DetailsView } from '@syncfusion/ej2-vue-filemanager';
import { CheckBoxComponent } from '@syncfusion/ej2-vue-buttons';
import { DropDownListComponent } from '@syncfusion/ej2-vue-dropdowns';

const hostUrl = 'https://physical-service.syncfusion.com/';

export default {
  components: {
    'ejs-filemanager': FileManagerComponent,
    'ejs-checkbox': CheckBoxComponent,
    'ejs-dropdownlist': DropDownListComponent
  },
  data() {
    return {
      ajaxSettings: {
        url: hostUrl + 'api/FileManager/FileOperations',
        getImageUrl: hostUrl + 'api/FileManager/GetImage',
        uploadUrl: hostUrl + 'api/FileManager/Upload',
        downloadUrl: hostUrl + 'api/FileManager/Download'
      },
      toolbarSettings: {
        items: ['NewFolder', 'SortBy', 'Cut', 'Copy', 'Paste', 'Delete', 'Refresh', 'Download', 'Rename', 'Selection', 'View', 'Details']
      },
      contextMenuSettings: {
        file: ['Cut', 'Copy', '|', 'Delete', 'Download', 'Rename', '|', 'Details'],
        layout: ['SortBy', 'View', 'Refresh', '|', 'Paste', '|', 'NewFolder', '|', 'Details', '|', 'SelectAll'],
        visible: true
      },
      view: 'LargeIcons',
      navigationPaneSettings: {
        visible: false
      },
      items: ['NewFolder', 'Cut', 'Copy', 'Paste', 'Download', 'Delete', 'Refresh', 'Selection', 'View', 'Details'],
      enableRangeSelection: true
    };
  },
  provide() {
    return {
      filemanager: [NavigationPane, Toolbar, DetailsView]
    };
  },
  methods: {
    toolbarChange(args: any) {
      const fileObj = this.$refs.fileObject as any;
      fileObj.ej2Instances.toolbarSettings.visible = args.checked ? true : false;
    },
    fileExtensionChange(args: any) {
      const fileObj = this.$refs.fileObject as any;
      fileObj.ej2Instances.showFileExtension = args.checked ? true : false;
    },
    thumbnailChange(args: any) {
      const fileObj = this.$refs.fileObject as any;
      fileObj.ej2Instances.showThumbnail = args.checked ? true : false;
    },
    selectionChange(args: any) {
      const fileObj = this.$refs.fileObject as any;
      fileObj.ej2Instances.enableRangeSelection = args.checked ? true : false;
    },
    onDisableItemChange(args: any) {
      const fileObj = this.$refs.fileObject as any;
      const enableDropDownList = this.$refs.enableDropDownList as any;
      if (args.itemData != null) {
        fileObj.ej2Instances.disableToolbarItems([args.itemData.value]);
        if (args.value === enableDropDownList.ej2Instances.value) {
          enableDropDownList.ej2Instances.value = null;
        }
      }
    },
    onEnableItemChange(args: any) {
      const fileObj = this.$refs.fileObject as any;
      const disableDropDownList = this.$refs.disableDropDownList as any;
      if (args.itemData != null) {
        fileObj.ej2Instances.enableToolbarItems([args.itemData.value]);
        if (args.value === disableDropDownList.ej2Instances.value) {
          disableDropDownList.ej2Instances.value = null;
        }
      }
    }
  }
};
</script>

<style scoped>
.file-api .sample-container {
  margin: 10px 10px 10px 10px;
}

.file-api .checkboxElement {
  font-size: 14px;
}

@media (max-width: 550px) {
  .file-api #rangeSelectionRow {
    display: none;
  }
}
</style>

```
