• Stars
    star
    1,925
  • Rank 24,079 (Top 0.5 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 6 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🔌 A handy FilePond adapter component for Vue

Vue FilePond

Vue FilePond is a handy adapter component for FilePond, a JavaScript library that can upload anything you throw at it, optimizes images for faster uploads, and offers a great, accessible, silky smooth user experience.

If you want to use Vue FilePond with Vue 2, please use v6 of this plugin.

License: MIT npm version npm


FilePond

Buy me a Coffee / Use FilePond with Pintura / Dev updates on Twitter


Core Features

  • Accepts directories, files, blobs, local URLs, remote URLs and Data URIs.
  • Drop files, select on filesystem, copy and paste files, or add files using the API.
  • Async uploading with AJAX, or encode files as base64 data and send along form post.
  • Accessible, tested with AT software like VoiceOver and JAWS, navigable by Keyboard.
  • Image optimization, automatic image resizing, cropping, and fixes EXIF orientation.
  • Responsive, automatically scales to available space, is functional on both mobile and desktop devices.

Learn more about FilePond


Also need Image Editing?

Pintura the modern JavaScript Image Editor is what you're looking for. Pintura supports setting crop aspect ratios, resizing, rotating, cropping, and flipping images. Above all, it integrates beautifully with FilePond.

Learn more about Pintura


Installation:

If you're using Vue 2 please run npm install vue-filepond@^6.0.0

npm install vue-filepond filepond

Usage:

<template>
  <div id="app">
    <file-pond
      name="test"
      ref="pond"
      label-idle="Drop files here..."
      v-bind:allow-multiple="true"
      accepted-file-types="image/jpeg, image/png"
      server="/api"
      v-bind:files="myFiles"
      v-on:init="handleFilePondInit"
    />
  </div>
</template>

<script>
// Import Vue FilePond
import vueFilePond from "vue-filepond";

// Import FilePond styles
import "filepond/dist/filepond.min.css";

// Import FilePond plugins
// Please note that you need to install these plugins separately

// Import image preview plugin styles
import "filepond-plugin-image-preview/dist/filepond-plugin-image-preview.min.css";

// Import image preview and file type validation plugins
import FilePondPluginFileValidateType from "filepond-plugin-file-validate-type";
import FilePondPluginImagePreview from "filepond-plugin-image-preview";

// Create component
const FilePond = vueFilePond(
  FilePondPluginFileValidateType,
  FilePondPluginImagePreview
);

export default {
  name: "app",
  data: function () {
    return { myFiles: ["cat.jpeg"] };
  },
  methods: {
    handleFilePondInit: function () {
      console.log("FilePond has initialized");

      // FilePond instance methods are available on `this.$refs.pond`
    },
  },
  components: {
    FilePond,
  },
};
</script>

When using FilePond with an SSR configuration like Nuxt.js it's best to wrap it in <no-ssr> tags.

<template>
  <no-ssr>
    <file-pond />
  </no-ssr>
</template>

Usage in the browser:

<!DOCTYPE html>
<html>
  <head>
    <title>Vue in Browser</title>

    <link
      rel="stylesheet"
      href="https://unpkg.com/filepond/dist/filepond.min.css"
    />
    <link
      rel="stylesheet"
      href="https://unpkg.com/filepond-plugin-image-preview/dist/filepond-plugin-image-preview.min.css"
    />
  </head>
  <body>
    <div id="app">
      <file-pond></file-pond>
    </div>

    <script src="https://unpkg.com/filepond-plugin-image-preview"></script>
    <script src="https://unpkg.com/filepond"></script>
    <script src="https://unpkg.com/vue"></script>
    <script src="https://unpkg.com/vue-filepond@6"></script>

    <script>
      new Vue({
        el: "#app",
        components: {
          FilePond: vueFilePond.default(FilePondPluginImagePreview),
        },
      });
    </script>
  </body>
</html>

Read the docs for more information

Live Demo with Code Sandbox

More Repositories

1

filepond

🌊 A flexible and fun JavaScript file upload library
JavaScript
15,062
star
2

react-filepond

🔌 A handy FilePond adapter component for React
JavaScript
1,838
star
3

flip

⏳ The online version of the classic flip clock
JavaScript
876
star
4

svelte-filepond

🔌 A handy FilePond adapter component for Svelte
JavaScript
246
star
5

jquery-filepond

🔌 A handy FilePond wrapper for jQuery
JavaScript
234
star
6

ngx-filepond

🔌 A handy FilePond adapter component for Angular
TypeScript
200
star
7

tick

⏱ A counter component to render different countdown styles with
JavaScript
83
star
8

filepond-boilerplate-php

🔥 A FilePond PHP project starter kit
HTML
64
star
9

angular-filepond

🔌 A handy FilePond adapter component for Angular
TypeScript
59
star
10

filepond-server-php

A PHP server that handles FilePond uploads
PHP
49
star
11

filepond-plugin-image-preview

🖼 Show a preview for images dropped on FilePond
JavaScript
46
star
12

snaptext

Snap a picture of HTML text
JavaScript
42
star
13

filepond-plugin-file-validate-type

🚦 File Type Validation plugin for FilePond
JavaScript
33
star
14

pintura-example-javascript

HTML
26
star
15

filepond-plugin-image-edit

✂️ Link image editor to allow editing of images dropped on FilePond
JavaScript
24
star
16

filepond-plugin-image-transform

🖼 Client-side image transformations for FilePond
JavaScript
18
star
17

filepond-plugin-file-validate-size

🚦 File Size Validation plugin for FilePond
JavaScript
18
star
18

filepond-plugin-file-encode

🗜 Send FilePond Files Along with Form Submit
JavaScript
13
star
19

doka-php

PHP files to handle apply FilePond and Doka formatted image resize and crop information to files
PHP
13
star
20

hud

A visual way to debug 2D data
JavaScript
12
star
21

pintura-example-react

JavaScript
12
star
22

filepond-plugin-image-exif-orientation

🖼 Extract EXIF orientation information from images dropped on FilePond
JavaScript
10
star
23

filepond-polyfill

🔨 Use FilePond on Older Browsers
JavaScript
9
star
24

filepond-plugin-file-poster

🖼 Add a poster image to files
JavaScript
9
star
25

snippy

🍡 Quickly create your own custom shortcodes
PHP
9
star
26

11ty-tablissimo

JavaScript
9
star
27

filepond-plugin-image-validate-size

🚦 Image Size Validation plugin for FilePond
JavaScript
9
star
28

filepond-plugin-image-crop

🖼 Add image crop instructions to files dropped on FilePond
JavaScript
8
star
29

filepond-plugin-image-resize

🖼 Add image resize instructions to files dropped on FilePond
JavaScript
8
star
30

pintura-example-jquery

HTML
7
star
31

pintura-example-vue-3

Vue
6
star
32

pintura-example-nextjs

JavaScript
6
star
33

filepond-plugin-file-rename

🏷 File rename plugin for FilePond
JavaScript
6
star
34

tick-view-boom

A freely available audio plugin for Tick Counter
JavaScript
6
star
35

filepond-plugin-file-metadata

🏷 File metadata plugin for FilePond
JavaScript
6
star
36

filepond-plugin-image-filter

🖼 Add a Color Matrix filter to images
JavaScript
5
star
37

pintura-example-react-typescript

TypeScript
5
star
38

pintura-example-react-native-expo

JavaScript
4
star
39

pintura-example-photo-editor

HTML
4
star
40

pintura-media-kit

Pintura media for third-parties
3
star
41

tablissimo

JavaScript
3
star
42

pintura-example-react-native

Java
3
star
43

pintura-example-cordova

JavaScript
2
star
44

filepond-plugin-image-editor

TypeScript
2
star
45

pintura-example-feature-retouch

JavaScript
2
star
46

pintura-component-react-native-expo

JavaScript
1
star
47

pintura-example-vue-2

Vue
1
star
48

pintura-example-sveltekit

Svelte
1
star
49

filepond-github-assets

Assets used on FilePond GitHub repository
1
star
50

pintura-example-jquery-file-upload

HTML
1
star
51

pintura-component-react-native

JavaScript
1
star
52

pintura-example-nuxt-2

Vue
1
star