@tofandel/filepond-plugin-get-file
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

Get File plugin for FilePond

License: MIT npm version

The Get File plugin will add a tiny 'download' icon in front of the filename to allow downloading the uploaded file.

Quick Start

Install using npm:

npm install filepond-plugin-get-file

Then import in your project:

import * as FilePond from 'filepond';
import FilePondPluginGetFile from 'filepond-plugin-get-file';

Also, don't forget to import the belonging styles:

@import '~filepond-plugin-get-file/dist/filepond-plugin-get-file.min.css';

Register the plugin:

FilePond.registerPlugin(FilePondPluginGetFile);

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 label of the download icon can be adjusted as follows:

const pond = FilePond.create({
    name: 'filepond',
    labelButtonDownloadItem: 'custom label', // by default 'Download file'
    allowDownloadByUrl: false, // by default downloading by URL disabled
});

Demo

View the demo

Readme

Keywords

none

Package Sidebar

Install

npm i @tofandel/filepond-plugin-get-file

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

17 kB

Total Files

10

Last publish

Collaborators

  • tofandel