🌊 A flexible and fun JavaScript file upload library

Overview

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.

License: MIT npm version

21 KB gzipped. FilePond adapters are available for React, Vue, Angular and jQuery

FilePond is maintained by Rik Schennink

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 uploads with AJAX, supports chunk uploads, can 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, filtering, 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?

Doka.js is what you're looking for. It's a Modern JavaScript Image Editor, Doka supports setting crop aspect ratios, resizing, rotating, cropping, and flipping images. Above all, it integrates beautifully with FilePond.

Learn more about Doka


FilePond Plugins

Adapters

Backend

Quick Start

Install using npm:

npm install filepond

Then import in your project:

import * as FilePond from 'filepond';

// Create a multi file upload component
const pond = FilePond.create({
    multiple: true,
    name: 'filepond'
});

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

Or get it from a CDN:

<!DOCTYPE html>
<html>
<head>
  <title>FilePond from CDN</title>

  <!-- Filepond stylesheet -->
  <link href="https://unpkg.com/filepond/dist/filepond.css" rel="stylesheet">

</head>
<body>

  <!-- We'll transform this input into a pond -->
  <input type="file" class="filepond">

  <!-- Load FilePond library -->
  <script src="https://unpkg.com/filepond/dist/filepond.js"></script>

  <!-- Turn all file input elements into ponds -->
  <script>
  FilePond.parse(document.body);
  </script>

</body>
</html>

Getting started with FilePond

Internationalization

The locale folder contains different language files, PR's are welcome, you can use locale files like this:

import pt_BR from 'filepond/locale/pt-br.js';

FilePond.setOptions(pt_BR);

Contributing

At the moment test coverage is not great, it's around 65%. To accept pull requests the tests need to be better, any help to improve them is very much appreciated.

Tests are based on Jest and can be run with npm run test

To build the library run npm run build

Publications

Browser Compatibility

FilePond is compatible with a wide range of desktop and mobile browsers, the oldest explicitly supported browser is IE11, for best cross browser support add FilePond Polyfill and Babel polyfill to your project.

FilePond uses BrowserStack for compatibility testing.

BrowserStack

License

Please don't remove or change the disclaimers in the source files

MIT License

Copyright (c) 2020 PQINA | Rik Schennink

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Comments
  • Chrome aw-snap [works on version 4.3.7]

    Chrome aw-snap [works on version 4.3.7]

    I am building a web service where a user can upload and configure a 'card' which inherits a live preview of the vue instance as you modify the configurator component, the uploading works great throughout however I have narrowed it down to a total of 5 images allowed, where anything more will crash chrome on accordian tab change, here is a preview of the tab.

    Screenshot 2019-08-04 at 16 20 28

    A preview of the uploading

    Screenshot 2019-08-04 at 16 23 17

    Once complete we can swap tabs Screenshot 2019-08-04 at 16 24 56

    Swapping tab back to the upload images accordian tab, crashes after showing the content! Screenshot 2019-08-04 at 16 19 25

    If the max-files setting is set to 5, it works fine with no crashing, it only happens when 5+ images are used, which leads me to believe it could be a resulting issue with filepond

    Safari does not produce a crash.


    | Environment | Version |------------- | ----------- | OS | MacOS | Device | Macbook Pro | Browser | Chrome Version 76.0.3809.87 (Official Build) (64-bit)

    opened by marky291 46
  • Drag and re-order files before upload

    Drag and re-order files before upload

    I have received a report from a user that a feature disappeared recently. Previously it was possible to drag and re-corder files before uploading them. Now it is not possible any more. Is this intentional?

    I have checked the documentation and commit log but could not find anything related to this change.

    enhancement 
    opened by leoliu 35
  • No update On the UI when moved to different browser tab

    No update On the UI when moved to different browser tab

    First of all.. great plugin. Thanks to the authors.

    Here is what noted.

    1. Uploaded 10 photos (options --- parallel uploads:10, max uploads: 50)
    2. I see some uploading percentage on all the files ( say 20%).
    3. Now, I go to another tab on the browser ( do some browsing)
    4. Until I come back to my upload screen, the progress percentage is not changing.. though files received & processed by server.
    bug 
    opened by picxydev 33
  • No event fired when image is edited

    No event fired when image is edited

    Summary

    When using an image editor to edit the image (like Doka) it doesn't fire an event to let you know that the image has been edited.

    Expected behaviour

    I expect a custom event to be called like onfileedit or just onfileadd for a more immutable approach with the file as argument.

    Additional information

    Because I want to handle the upload process myself I manually call filepond.processFile which works fine for just adding images, but if you edit them there's no event to track that and upload the edited image.

    Versions

    "filepond": "^3.5.1",
    "filepond-plugin-image-crop": "^2.0.0",
    "filepond-plugin-image-edit": "^1.0.1",
    "filepond-plugin-image-exif-orientation": "^1.0.3",
    "filepond-plugin-image-preview": "^3.1.4",
    "filepond-plugin-image-resize": "^2.0.1",
    "filepond-plugin-image-transform": "^3.1.0",
    
    enhancement 
    opened by rovansteen 30
  • how to populate initial files from remote URLs

    how to populate initial files from remote URLs

    I have successfully uploaded the files over the server with this plugin, now i want to display the already uploaded files ( residing on S3 bucket). Even if i use :files property, i dont get a preview of the image. So my question is, what is the best way to display the uploaded images/URL ?? (in my case AWS S3 url)

    <file-pond
            name="filepond"
            ref="pond"
            class="user-profile-picture"
            label-idle='Drag & Drop your files or <span class="filepond--label-action"> Browse </span>'
            
            dropValidation="true"
            instantUpload="false"    
            @processfile="updateFiles"
            :server="server"
            :files = myFiles
            /> 
    
    return {
          myFiles: [{
              source: "https://www.google.com/logos/doodles/2018/baba-amtes-104th-birthday-6729609885253632-s.png",
              options:{
                    type: 'remote'
              }
          }],
    }
    
    opened by power-cut 27
  • Hangs on Firefox 52

    Hangs on Firefox 52

    Summary

    FilePond hangs in uploading state on Firefox 52

    How to reproduce

    Use Firefox 52, either natively or via Browserstack. Go to www.ilovefreegle.org Click on Give Enter a UK postcode e.g. PR3 2NX and click Next Click Add Photos Click the Browse button Select a photo file

    The entire browser locks at this point.

    I haven't done a standalone demo because I think this is probably not related to my code - I see the same thing on https://codesandbox.io/s/github/KimGenius/React-file-pond/tree/master/?from-embed, for example.

    Expected behaviour

    File is uploaded and process callback is triggered.

    This works on later versions of Firefox.

    Additional information

    I've checked the return from supported(), which returns true.

    image

    | Environment | Version |------------- | ----------- | OS | Windows | Device | BrowserStack W7 PC | Browser | Firefox 52

    bug 
    opened by edwh 26
  • Loading files without transferring file contents

    Loading files without transferring file contents

    Hi there,

    I'm using FilePond to upload a file within in an interface for a data object. The user can then go back to edit that data object, where I would like to show them the currently uploaded file and give them the option to delete that one and upload another.

    FilePond does this very well, as I can add the previously uploaded file data to the files array and use the load part of the server API to show the file's name and size.

    This is great, except it seems to require that I return the file contents in the server load request, so it appears that each time the user visits the page of a data object FilePond will download the file, which isn't necessary.

    I might be missing something obvious, but is there a way to simply add the file details (e.g. name and size) to the files array instead of performing a request for the file?

    Thanks!

    enhancement 
    opened by mattkibbler 26
  • Filepond not save updated file from doka

    Filepond not save updated file from doka

    Hello! I try updated my file from Doka, but when sending files to the server, the base64 file remains the same as it was. The preview of the image changes, but the image itself is not when it is sent.

    import {
        // editor
        openEditor,
        processImage,
        createDefaultImageReader,
        createDefaultImageWriter,
        imageOrienter,
        locale_en_gb,
        legacyDataToImageState,
        // plugins
        setPlugins,
        plugin_crop,
        plugin_crop_defaults,
        plugin_crop_locale_en_gb,
        plugin_finetune,
        plugin_finetune_defaults,
        plugin_finetune_locale_en_gb,
        plugin_filter,
        plugin_filter_defaults,
        plugin_filter_locale_en_gb,
        plugin_decorate,
        plugin_decorate_defaults,
        plugin_decorate_locale_en_gb,
        component_shape_editor_locale_en_gb,
    } from '/assets/uploader/doka/doka.js';
    setPlugins(plugin_crop, plugin_finetune, plugin_filter, plugin_decorate);
    FilePond.registerPlugin(
        FilePondPluginFileValidateType,
        FilePondPluginImageEditor,
        FilePondPluginFilePoster,
        FilePondPluginImageCrop,
        FilePondPluginFileMetadata,
        FilePondPluginImageTransform,
        FilePondPluginFileEncode
    );
    
    FilePond.setOptions({
        allowMultiple: true,
        allowReorder: true,
        onconfirm: (output) => {
            console.log(output);
        },
        onpreparefile: (file, output) => {
            console.log(file, output, 'file')
        },
        imageTransformImageFilter: (item) =>
            new Promise((resolve) => {
                resolve(false);
            }),
        onpreparefile: (fileItem, res) => {
            console.log(res);
        },
        // Added this ----------------------------------------
        onreorderfiles(files, origin, target) {
        }
    });
    
    pondImg = FilePond.create(document.querySelector('#filepond-imgs'), {
        imageEditor: {
            // map legacy data objects to new imageState objects
            legacyDataToImageState: legacyDataToImageState,
    
            // used to create the editor, receives editor configuration, should return an editor instance
            createEditor: openEditor,
    
            // Required, used for reading the image data
            imageReader: [createDefaultImageReader],
    
            // optionally. can leave out when not generating a preview thumbnail and/or output image
            imageWriter: [createDefaultImageWriter],
    
            // used to generate poster images, runs an editor in the background
            imageProcessor: processImage,
    
            // editor options
            editorOptions: {
                imageOrienter: imageOrienter,
                ...plugin_crop_defaults,
                ...plugin_finetune_defaults,
                ...plugin_filter_defaults,
                ...plugin_decorate_defaults,
                locale: {
                    ...locale_en_gb,
                    ...plugin_crop_locale_en_gb,
                    ...plugin_finetune_locale_en_gb,
                    ...plugin_filter_locale_en_gb,
                    ...plugin_decorate_locale_en_gb,
                },
            },
        },
        filePosterMaxHeight: 100
    });
    
    

    And code sending on click my button:

    let filesImg = pondImg.getFiles();
    let formData = new FormData();
    formData.append('object_id', response.object_id);
    $.each(pondImg.getFiles(), function (i, file) {
            formData.append('X', file.file);
             formData.append('X['+i+']', file.getFileEncodeBase64String());
     })
    $.ajax({
         url: "/file_upload",
        method: "POST",
        data: formData,
        cache: false,
        processData: false,
        contentType: false
     }).done((response_files) => {
         console.log(response_files);
    });
    

    On server all time i get the same string base64. Please help me.

    opened by Sector911 24
  • Uploaded files not properly Exif orientated

    Uploaded files not properly Exif orientated

    Hi,

    I am not sure why but I can not manage to get filepond to upload a transformed file with the proper exif orientation.

    The preview is working as expected, alas no matter what i do the uploaded file is always missing the proper orientation.

    I am really turning crazy, the metadata file generated returns the orientation of the picture taken. The resizing is applied all right but the exif correction is not applied.

    This is probably not the right place to come for help so feel free to delete this. But any pointers should the answer be an obvious thing would be most welcome.

    Thanks for an amazing module that is filepond.

    <input type="file" class="filepond" accept="image/png, image/jpeg">
    		
    <!-- Load FilePond library -->
    <script src="https://unpkg.com/filepond-plugin-image-exif-orientation/dist/filepond-plugin-image-exif-orientation.js"></script>
    <script src="https://unpkg.com/filepond-plugin-file-validate-type/dist/filepond-plugin-file-validate-type.js"></script>
    <script src="https://unpkg.com/filepond-plugin-file-rename/dist/filepond-plugin-file-rename.js"></script>
    <script src="https://unpkg.com/filepond-plugin-image-preview/dist/filepond-plugin-image-preview.js"></script>
    <script src="https://unpkg.com/filepond-plugin-image-resize/dist/filepond-plugin-image-resize.js"></script>
    <script src="https://unpkg.com/filepond-plugin-image-transform/dist/filepond-plugin-image-transform.js"></script>
    <script src="https://unpkg.com/filepond/dist/filepond.js"></script>
    
    <script>
    FilePond.registerPlugin(FilePondPluginImageExifOrientation,FilePondPluginFileValidateType,FilePondPluginFileRename,FilePondPluginImagePreview,FilePondPluginImageResize,FilePondPluginImageTransform);
     
    const inputElement = document.querySelector('input[type="file"]');
    
    const pond = FilePond.create(inputElement, {
    	labelIdle: `<span class="filepond--label-action" style="padding: 0px ; margin: 0px">Take animal picture</span>`,
    	imageResizeTargetWidth: 800,
    	imageTransformOutputMimeType: 'image/jpeg',
    	imageTransformOutputQuality: 85,
    	imagePreviewHeight: 350,
    	}
    );
    
    FilePond.setOptions({
    	server: 'filepond/',
            fileRenameFunction: (file) => {
    		return `tmp_patient${file.extension}`;
    		}
    	})
    </script>
    
    bug 
    opened by Yericus 24
  • [React] Can't load File preview from URL

    [React] Can't load File preview from URL

    First of all thanks for this component, it's great!

    On the React version, when uploading a picture, I get the preview and everything works great, then I store in my resource the picture url. But then when I consult my resource, I try to set up the initial state with a file, but somehow I can't get the preview of that image url.

    My code :

    <FilePond allowMultiple={false} server={{process: this.handleProcessing.bind(this)}}>
        <File source='http://liviogama.com/img/Pioneer-CDJ2000-Nexus.png' type='local'/>
    </FilePond>
    

    Result : capture d ecran 2018-04-21 a 02 07 51

    opened by LivioGama 24
  • drag n drop with grid or column

    drag n drop with grid or column

    Added getItemWidth function to be used in dragItem to get the number of rows and columns. Combining this information with our drag position we can find out where in the grid (column mod is a grid of one column) we are and how the index should update.

    Known issue: If user drags item left or right outside of root it will continue updating the index.

    opened by jwsinner 22
  • Bump json5 from 2.1.0 to 2.2.3

    Bump json5 from 2.1.0 to 2.2.3

    Bumps json5 from 2.1.0 to 2.2.3.

    Release notes

    Sourced from json5's releases.

    v2.2.3

    v2.2.2

    • Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (#295).

    v2.2.1

    • Fix: Removed dependence on minimist to patch CVE-2021-44906. (#266)

    v2.2.0

    • New: Accurate and documented TypeScript declarations are now included. There is no need to install @types/json5. (#236, #244)

    v2.1.3 [code, diff]

    • Fix: An out of memory bug when parsing numbers has been fixed. (#228, #229)

    v2.1.2

    • Fix: Bump minimist to v1.2.5. (#222)

    v2.1.1

    • New: package.json and package.json5 include a module property so bundlers like webpack, rollup and parcel can take advantage of the ES Module build. (#208)
    • Fix: stringify outputs \0 as \\x00 when followed by a digit. (#210)
    • Fix: Spelling mistakes have been fixed. (#196)
    Changelog

    Sourced from json5's changelog.

    v2.2.3 [code, diff]

    v2.2.2 [code, diff]

    • Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (#295).

    v2.2.1 [code, diff]

    • Fix: Removed dependence on minimist to patch CVE-2021-44906. (#266)

    v2.2.0 [code, diff]

    • New: Accurate and documented TypeScript declarations are now included. There is no need to install @types/json5. (#236, #244)

    v2.1.3 [code, diff]

    • Fix: An out of memory bug when parsing numbers has been fixed. (#228, #229)

    v2.1.2 [code, diff]

    • Fix: Bump minimist to v1.2.5. (#222)

    v2.1.1 [code, [diff][d2.1.1]]

    ... (truncated)

    Commits
    • c3a7524 2.2.3
    • 94fd06d docs: update CHANGELOG for v2.2.3
    • 3b8cebf docs(security): use GitHub security advisories
    • f0fd9e1 docs: publish a security policy
    • 6a91a05 docs(template): bug -> bug report
    • 14f8cb1 2.2.2
    • 10cc7ca docs: update CHANGELOG for v2.2.2
    • 7774c10 fix: add proto to objects and arrays
    • edde30a Readme: slight tweak to intro
    • 97286f8 Improve example in readme
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump qs from 6.5.2 to 6.5.3

    Bump qs from 6.5.2 to 6.5.3

    Bumps qs from 6.5.2 to 6.5.3.

    Changelog

    Sourced from qs's changelog.

    6.5.3

    • [Fix] parse: ignore __proto__ keys (#428)
    • [Fix] utils.merge: avoid a crash with a null target and a truthy non-array source
    • [Fix] correctly parse nested arrays
    • [Fix] stringify: fix a crash with strictNullHandling and a custom filter/serializeDate (#279)
    • [Fix] utils: merge: fix crash when source is a truthy primitive & no options are provided
    • [Fix] when parseArrays is false, properly handle keys ending in []
    • [Fix] fix for an impossible situation: when the formatter is called with a non-string value
    • [Fix] utils.merge: avoid a crash with a null target and an array source
    • [Refactor] utils: reduce observable [[Get]]s
    • [Refactor] use cached Array.isArray
    • [Refactor] stringify: Avoid arr = arr.concat(...), push to the existing instance (#269)
    • [Refactor] parse: only need to reassign the var once
    • [Robustness] stringify: avoid relying on a global undefined (#427)
    • [readme] remove travis badge; add github actions/codecov badges; update URLs
    • [Docs] Clean up license text so it’s properly detected as BSD-3-Clause
    • [Docs] Clarify the need for "arrayLimit" option
    • [meta] fix README.md (#399)
    • [meta] add FUNDING.yml
    • [actions] backport actions from main
    • [Tests] always use String(x) over x.toString()
    • [Tests] remove nonexistent tape option
    • [Dev Deps] backport from main
    Commits
    • 298bfa5 v6.5.3
    • ed0f5dc [Fix] parse: ignore __proto__ keys (#428)
    • 691e739 [Robustness] stringify: avoid relying on a global undefined (#427)
    • 1072d57 [readme] remove travis badge; add github actions/codecov badges; update URLs
    • 12ac1c4 [meta] fix README.md (#399)
    • 0338716 [actions] backport actions from main
    • 5639c20 Clean up license text so it’s properly detected as BSD-3-Clause
    • 51b8a0b add FUNDING.yml
    • 45f6759 [Fix] fix for an impossible situation: when the formatter is called with a no...
    • f814a7f [Dev Deps] backport from main
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump decode-uri-component from 0.2.0 to 0.2.2

    Bump decode-uri-component from 0.2.0 to 0.2.2

    Bumps decode-uri-component from 0.2.0 to 0.2.2.

    Release notes

    Sourced from decode-uri-component's releases.

    v0.2.2

    • Prevent overwriting previously decoded tokens 980e0bf

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2

    v0.2.1

    • Switch to GitHub workflows 76abc93
    • Fix issue where decode throws - fixes #6 746ca5d
    • Update license (#1) 486d7e2
    • Tidelift tasks a650457
    • Meta tweaks 66e1c28

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • File Pond is not creating the hidden fields using this code [Bug]

    File Pond is not creating the hidden fields using this code [Bug]

    Is there an existing issue for this?

    • [X] I have searched the existing issues

    Have you updated FilePond and its plugins?

    • [X] I have updated FilePond and its plugins

    Describe the bug

    The following code is expected to create a hidden field with the base64String but nothing is happening, i am not getting the base64String in the request neither as a hidden field. I am in Laravel Blade

    Reproduction

        <input type="file" multiple name="image" />
    
        <!-- Get FilePond JavaScript and its plugins from the CDN -->
        <script src="https://unpkg.com/filepond/dist/filepond.js"></script>
        <script src="https://unpkg.com/filepond-plugin-file-encode/dist/filepond-plugin-file-encode.js"></script>
        <script src="https://unpkg.com/filepond-plugin-file-validate-size/dist/filepond-plugin-file-validate-size.js"></script>
    
        <!-- FilePond init script -->
        <script>
    
        // Register plugins
        FilePond.registerPlugin(
            FilePondPluginFileEncode,
            FilePondPluginFileValidateSize,
        );
    
        // Set default FilePond options
        FilePond.setOptions({
    
            // allow multiple files
            allowMultiple: true,
    
            // allow file encoding
            allowFileEncode: true,
    
            // maximum allowed file size
            maxFileSize: '255KB',
    
            // upload to this server end point
            server:{
                process: '/image-upload',
                revert: '/image-delete',
                headers: {
                        'X-CSRF-TOKEN': '{{ csrf_token() }}'
                    }
                }
        });
    
        // Turn a file input into a file pond
        var pond = FilePond.create(document.querySelector('input[type="file"]'));
    
            pond.onaddfile = (err, item) => {
    
            if (err) {
                console.warn(err);
                return;
            }
    
            const dataURL = item.getFileEncodeDataURL();
    
            const base64String = item.getFileEncodeBase64String();
    
            }
    
        </script>
    

    Environment

    - Device:
    - OS:
    - Browser:
    
    bug 
    opened by joshmanhuwa 1
  • [Feature] Forced index for storeAsFile inputs

    [Feature] Forced index for storeAsFile inputs

    Is there an existing issue for this?

    • [X] I have searched the existing issues

    Is your feature request related to a problem? Please describe.

    I'm using the reorder feature to drag my images in order and this works perfectly, the 'problem' occurs when im trying to save this order of images. The initial images will be posted with a hidden input and their indentifier as the value and the files get send through a file input. On the PHP side we would have to retrieve these values in 2 different ways, the $_POST for the initial file identifiers and the $_FILES for any extra uploaded files. Now these 2 properties have their own index, so the order we set in the filepond instance is lost.

    Describe the solution you'd like

    I seems like we could easily solve this by forcing the index for each input based on their rank, so instead of this:

    <fieldset class="filepond--data">
        <input type="hidden" name="images[]" value="3">
        <input type="file" name="images[]">
        <input type="hidden" name="images[]" value="4">
    </fieldset>
    

    it will become:

    <fieldset class="filepond--data">
        <input type="hidden" name="images[0]" value="3">
        <input type="file" name="images[1]">
        <input type="hidden" name="images[2]" value="4">
    </fieldset>
    

    Then we can easily merge the $_POST and $_FILES without problems because they have their own indexes.

    Describe alternatives you've considered

    The alternatives would be keeping track of these kind of values through their own hidden input. So we send an input array for the order of the files. I dont like this because then there are also other things we should keep track of that the solutation above would prevent. For example, if certain files are deleted.

    opened by skulllair 0
Releases(4.28.2)
Owner
pqina
@pqina is @rikschennink's tiny one man web outpost.
pqina
Moxiecode 5.6k Jan 1, 2023
FileAPI — a set of javascript tools for working with files. Multiupload, drag'n'drop and chunked file upload. Images: crop, resize and auto orientation by EXIF.

FileAPI A set of JavaScript tools for working with files. Get started Download the files from the dist directory, and then: <div> <!-- "js-fileapi-

Free and open source software developed at Mail.Ru 3.6k Jan 3, 2023
Multiple file upload plugin with image previews, drag and drop, progress bars. S3 and Azure support, image scaling, form support, chunking, resume, pause, and tons of other features.

Fine Uploader is no longer maintained and the project has been effectively shut down. For more info, see https://github.com/FineUploader/fine-uploader

Fine Uploader 8.2k Jan 2, 2023
A JavaScript library providing multiple simultaneous, stable, fault-tolerant and resumable/restartable file uploads via the HTML5 File API.

Flow.js Flow.js is a JavaScript library providing multiple simultaneous, stable and resumable uploads via the HTML5 File API. (Demo) The library is de

HTML5 File upload 2.9k Dec 18, 2022
Multi Upload with Progress Bar in Vanilla JS

js-progress-bar-multi-upload Multi Upload with Progress Bar in Vanilla JS Youtube dersinde birlikte hazırladığımız çoklu progress barlı javascript upl

Tayfun Erbilen 11 Jun 10, 2022
runk is a simple file and folder sharer.

runk It is a simple file and folder sharer. It uses hyperswarm for sharing over network. Installation: Prerequisite: Node.js To mount, configured fuse

Amansinh Parmar 8 Mar 11, 2022
Dropzone is an easy to use drag'n'drop library. It supports image previews and shows nice progress bars.

Dropzone is a JavaScript library that turns any HTML element into a dropzone. This means that a user can drag and drop a file onto it, and Dropzone wi

Dropzone 17k Dec 30, 2022
A simple React App that plays Public Domain TV shows and integrates with Twitch Chat for the controls.

Public Domain Television for Twitch This application plays movies from Public Domain Movies The current version is only used to play Cartoons, but can

Ravavyr 8 Mar 29, 2022
🌊 A flexible and fun JavaScript file upload library

A JavaScript library that can upload anything you throw at it, optimizes images for faster uploads, and offers a great, accessible, silky smooth user

pqina 13.2k Jan 7, 2023
🌊 A flexible and fun JavaScript file upload library

A JavaScript library that can upload anything you throw at it, optimizes images for faster uploads, and offers a great, accessible, silky smooth user

pqina 13.2k Jan 3, 2023
Moxiecode 5.6k Jan 1, 2023
This is an upload script which allows you to upload to web3 storage using JS.

This is an upload script which allows you to upload to web3 storage using JS. first make sure to run npm install on the directory run script using nod

null 1 Dec 24, 2021
Upload or Upload & Publish your bundle (apk or aab) to Huawei AppGallery with ConnectApi

appgallery-publisher Upload/Publish your bundle (apk or aab) to AppGallery automatically with appgallery-publisher Usage Single Javascript File Bash F

Mustafa Yiğit 17 Sep 19, 2022
☕️ simple, flexible, fun javascript test framework for node.js & the browser

☕️ Simple, flexible, fun JavaScript test framework for Node.js & The Browser ☕️ Links Documentation Release Notes / History / Changes Code of Conduct

Mocha 21.8k Dec 30, 2022
A query builder for PostgreSQL, MySQL and SQLite3, designed to be flexible, portable, and fun to use.

knex.js A SQL query builder that is flexible, portable, and fun to use! A batteries-included, multi-dialect (MSSQL, MySQL, PostgreSQL, SQLite3, Oracle

knex 16.9k Jan 4, 2023
FileAPI — a set of javascript tools for working with files. Multiupload, drag'n'drop and chunked file upload. Images: crop, resize and auto orientation by EXIF.

FileAPI A set of JavaScript tools for working with files. Get started Download the files from the dist directory, and then: <div> <!-- "js-fileapi-

Free and open source software developed at Mail.Ru 3.6k Jan 3, 2023
Multiple file upload plugin with image previews, drag and drop, progress bars. S3 and Azure support, image scaling, form support, chunking, resume, pause, and tons of other features.

Fine Uploader is no longer maintained and the project has been effectively shut down. For more info, see https://github.com/FineUploader/fine-uploader

Fine Uploader 8.2k Jan 2, 2023
A quickstart AWS Lambda function code generator. Downloads a template function code file, test harness file, sample SAM deffiniation and appropriate file structure.

Welcome to function-stencil ?? A quickstart AWS Lambda function code generator. Downloads a template function code file, test harness file, sample SAM

Ben Smith 21 Jun 20, 2022
Serve file server with single zip file as file system in Deno.

zipland Serve file server with one-single zip file in Deno. Support zip just zip32 with deflated or uncompressed serving plaintext deflate Examples Yo

Yongwook Choi 18 Nov 2, 2022