Skip to main content

beforeUploadFile

fires before file upload begins

beforeUploadFile: (file: object, value: object[]) => boolean | void;

Parameters:

  • file: object - the file object
  • value: array - the current value of the control

Returns:

Return false to cancel file uploading; otherwise, true.

Example

form.getItem("simplevault").events.on("beforeUploadFile", function(file, value) {
console.log("beforeUploadFile", file, value);
return true;
});

Change log:

The value parameter is added in v7.0.