Skip to main content

beforeUploadFile

fires before file upload begins

beforeUploadFile: (file: ISimpleVaultValue, value: ISimpleVaultValue[]) => 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.