🌊 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 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
  • [Bug] onwarning event works not correct with Max files error and drag and drop in Chrome browser

    [Bug] onwarning event works not correct with Max files error and drag and drop in Chrome browser

    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

    This problem is occurred only in Chrome browser and in case when you are using drag and drop methods to add files to the filepond uploading area. To view the problem you can log the data in onwarning event like:

    onwarning: (oObject) => {
                        const { body, type } = oObject;
                        if (type === 'warning' && body === 'Max files') 
                            console.log(oObject);
                    },
    

    Reproduction

    1. set option maxFiles to 5
    2. open area with files and select 5 items -> then drag and drop them to filepond uploading area
    3. remove 4 files from filepond uploading area after finishing
    4. open area with files again and drag and drop at least one file

    So, you will see that now there are only 2 files in filepond area, but onwarning still occurs with Max files error.

    Environment

    - Device: PC
    - OS: MAC Sierra, Windows 11
    - Browser: Chrome 99+
    
    bug 
    opened by AlexeyUna 0
Releases(4.28.2)
Owner
pqina
@pqina is @rikschennink's tiny one man web outpost.
pqina
İnstagram Clone.You can sign in, sign up, upload image, make comment 📷 Used ReactJS, Material UI, Firebase, Firestore Database

?? instagram-clone This is a instagram clone. You can sign in, sign up, upload image, make comment ?? ⚡ LIVE To check out the live demo of this app AB

null 22 Apr 20, 2022
A very lightweight and flexible accessible modal dialog script.

A11y Dialog This is a lightweight (1.3Kb) yet flexible script to create accessible dialog windows. Documentation ↗ Demo on CodeSandbox ↗ Features: Clo

Kitty Giraudel 2.1k Jan 2, 2023
🏎 A set of primitives to build simple, flexible, WAI-ARIA compliant React autocomplete, combobox or select dropdown components.

downshift ?? Primitives to build simple, flexible, WAI-ARIA compliant React autocomplete, combobox or select dropdown components. Read the docs | See

Downshift 11.1k Dec 28, 2022
Gnome Shell extension to provide a flexible applications dock (WIP).

Flexi Dock (WIP) Gnome Shell extension to provide a flexible applications dock. Installation The easiest way to install this extension is via the offi

Hardpixel 3 Aug 29, 2022
Provide solutions to make your app flexible for different screen sizes, different devices.

react-native-size-scaling Provide solutions to make your app flexible for different screen sizes, different devices, based on your device's pixel rati

Hoà Phan 33 Dec 23, 2022
This is a starter file with base SvelteKit skeleton configurations with Open Props, Jit Props, and PostCSS configured.

create-svelte Everything you need to build a Svelte project, powered by create-svelte; Creating a project If you're seeing this, you've probably alrea

Brittney Postma 4 Jul 22, 2022
Glob - Github action to match glob patterns and retrieve the relative file paths.

Glob - Github action to match glob patterns and retrieve the relative file paths.

tj-actions 8 Dec 12, 2022
.properties file parser, JSON converter and Webpack loader.

properties-file .properties file parser, JSON converter and Webpack loader. Installation ?? ⚠ in June 2022 we have released version 2 of this package

Avansai 6 Dec 15, 2022
frida runtime (no python required, only a single file),One-click support for ios smashing shell

fd 简要介绍 要是你看不懂中文可以使用chrome翻译功能 frida 运行时(不需要python,只有单一个文件) fd 使用fd前请确认手机上有frida-server a brief introdction English can use chrome translation frida r

null 181 Dec 30, 2022
Next-multipart - Easy & Simple File Uploads for Next.js

Next-Multipart Next-multipart is a small utility library to ease the process of file uploads with Next.js. It uses formidable under the hood, but with

Tim Raderschad 10 Nov 11, 2022
A web-app built with next.js that can automatically install mods into a new Minecraft or MultiMC Launcher Profile using the File System Access API

Mod Installer This is a Next.js App which automatically installs fabric mods on your PC and creates a Minecraft Launcher Profile for you. Idea & Inspi

Emma Böcker 18 Nov 27, 2022
JavaScript UI Component Library

Fancyapps UI Collection of task-oriented components that will make you more productive. Packed full of features that you and your clients will love. F

Jānis Skarnelis 326 Dec 24, 2022
JAVASCRIPT library recognition of signs input from the smartphone display

Recosigns Demo: https://gaidadei.ru/recosigns/demo/ Documentation: https://gaidadei.ru/recosigns/ Download: https://gaidadei.ru/recosigns/recosigns.zi

null 23 Nov 12, 2022
Phonemask - Library for processing the phone input field in the web form. Only native javascript is used

phonemask Library for processing the phone input field in the web form. Only native javascript is used Usage: Adding a library to HTML <script type="a

Neovav 2 Sep 20, 2022
This is a TypeScript/JavaScript library which verifies the QR codes of certificates issued by the South African COVID-19 Vaccine Certificate System.

This is a TypeScript/JavaScript library which verifies the QR codes of certificates issued by the South African COVID-19 Vaccine Certificate System.

Adrian Frith 2 Feb 16, 2022
The best JavaScript Data Table for building Enterprise Applications. Supports React / Angular / Vue / Plain JavaScript.

Module SonarCloud Status ag-grid-community ag-grid-enterprise AG Grid AG Grid is a fully-featured and highly customizable JavaScript data grid. It del

AG Grid 9.5k Dec 30, 2022
Pickle tree - Javascript tree component made with pure javascript

Pickle Tree Pickle tree is a tree component written as completely pure javascript. Just send json file to object and have fun :-D Pickle tree does't n

Kadir Barış Bozat 17 Nov 13, 2022
Mobile app development framework and SDK using HTML5 and JavaScript. Create beautiful and performant cross-platform mobile apps. Based on Web Components, and provides bindings for Angular 1, 2, React and Vue.js.

Onsen UI - Cross-Platform Hybrid App and PWA Framework Onsen UI is an open source framework that makes it easy to create native-feeling Progressive We

null 8.7k Jan 8, 2023
Material-UI is a simple and customizable component library to build faster, beautiful, and more accessible React applications. Follow your own design system, or start with Material Design.

Material-UI Quickly build beautiful React apps. Material-UI is a simple and customizable component library to build faster, beautiful, and more access

Material-UI 83.6k Dec 30, 2022