filepond-plugin-manage-metadata

1.0.9 • Public • Published

Manage metadata plugin for FilePond

License: MIT npm version

The Manage Metadata plugin will add a tiny 'edit' icon in front of the filename to allow updating the metadata of the uploaded file.

Quick Start

Install using npm:

npm install filepond-plugin-manage-metadata

Then import in your project:

import * as FilePond from 'filepond';
import FilePondPluginManageMetadata from 'filepond-plugin-manage-metadata';

Register the plugin:

FilePond.registerPlugin(FilePondPluginManageMetadata);

Create a new FilePond instance as normal.

const pond = FilePond.create({
    name: 'filepond'
});

// Add it to the DOM
document.body.appendChild(pond.element);

The functionality will become active after uploading a file.

Configuration

The following options can be provided:

const pond = FilePond.create({
    name: 'filepond',
    enableManageMetadata: true, // by default true, can be used to disable this plugin for a particular FilePond instance
    labelButtonManageMetadata: 'custom label', // by default 'Edit metadata'
    onManageMetadata: (item) => console.log('onManageMetadata hook called', item) // callback method which will be called upon clicking the edit icon
});

Demo

View the demo

Readme

Keywords

none

Package Sidebar

Install

npm i filepond-plugin-manage-metadata

Weekly Downloads

3

Version

1.0.9

License

MIT

Unpacked Size

17.7 kB

Total Files

9

Last publish

Collaborators

  • nielsboogaard