You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introducing a timeout value to fix stalled uploads seem to have broken the uploaded file deletion.
When clicking on delete the file is immediately re-uploaded...
See the gif below.
Already filed a github issue in the Filepond repository: pqina/filepond#950
The text was updated successfully, but these errors were encountered:
Realized that this issue is react specific, thus opened an issue in here as well: pqina/react-filepond#239
narrowed the cause for the issue down to setUploadedFiles being called in the onremovefile event handler (see below)
onremovefile={(_, file) => {
setFilesUploadFinished(false);
const fileName = file.filename;
// only update state if the file processing was finished (status 2 = IDLE)
// for reference see
// github.com/pqina/filepond-docs/blob/master/content/patterns/API/filepond-object.md#filestatus-enum
// if below is commented out it is working on the live environment
if (
file.status === 2 &&
file.getMetadata("processingAborted") !== true
) {
setUploadedFiles((prev) => {
const prevCopy = { ...prev };
delete prevCopy[fileName];
return prevCopy;
});
}
}}
Details
Introducing a timeout value to fix stalled uploads seem to have broken the uploaded file deletion.
When clicking on delete the file is immediately re-uploaded...
See the gif below.
Already filed a github issue in the Filepond repository:
pqina/filepond#950
The text was updated successfully, but these errors were encountered: