Skip to main content

beforeRemove

fires before a file is removed from the data collection

beforeRemove: (file: object) => boolean | void;

Parameters:

  • file: object - the file object

Returns:

Return false to prevent removing of a file from the data collection; otherwise, true.

Example

form.getItem("simplevault").data.events.on("beforeRemove", function(file) {
console.log("beforeRemove", file);
// return false;
});
info

The beforeRemove event is an event of data collection