Giter Site home page Giter Site logo

Comments (5)

aitorllj93 avatar aitorllj93 commented on May 13, 2024 1

Hi @rikschennink, sorry, was my fault, I had already handled the remove event but didn't saw it.

The problem now is, this event gets called also during revert process so I'm unable to know if that file was already deleted by the revert handler

from filepond.

rikschennink avatar rikschennink commented on May 13, 2024

Iโ€™ll test it this afternoon, itโ€™s set up to remove temporary files, so maybe I missed a use-case ๐Ÿ™ƒ

from filepond.

rikschennink avatar rikschennink commented on May 13, 2024

@aitorllj93 There's currently no remove end-point. It only handles reverting temporary files.

The reasoning behind this is that destructive actions like that should be done after careful consideration ( and would require an undo option or serious confirm popup ). FilePond keeps a list of current files, then, when the parent form is submitted you can determine the differences after the user made changes to the files list and remove the necessary files from the server.

I'm considering adding this as an option but am wondering if the solution above would work for your use-case?

from filepond.

rikschennink avatar rikschennink commented on May 13, 2024

@aitorllj93 Yes that's also a way handle it. I think a property to indicate the origins of the file would be a nice addition, something like: local, limbo, input. That should offer enough detail to be able to handle file removal in the remove handler.

from filepond.

rikschennink avatar rikschennink commented on May 13, 2024

@aitorllj93 Just added the origin property to the file item and the FileOrigin enum to the FilePond object. The origin is either 1, 2 or 3, and you can use the FileOrigin enum to make your code more readable.

It's available in version 1.6.1

export const FileOrigin = {
    INPUT:1,
    LIMBO:2,
    LOCAL:3
};

from filepond.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.