Clicking on "Tap to cancel" is not working and not removing files

Viewed 234

Hey guys I am quite stuck at the moment - I have override the process method however on my front end whenever I click ''Tap to cancel" - nothing happens. I have tried logging in various places but none of them get hit - can you assist?

1 Answers

Same issue was occurring on my project. In my case I found that I had added "async" to the process function and after removing, the functionality worked as expected.

The filepond api expected return type of object with abort() function but In my case it was returned as a promise because of async keyword.

     server={{
              process: async(
                fieldName,
                file,
                metadata,
                load,
                error,
                progress,
                abort
              ) => {
                 // code
                return {
                  abort: () => { 
                    console.log(`aborts`);
                    abort();
                  },
                };
               },
            }}

Check codesandbox try removing async and it works

Related