Set the upload control as required or not required.
Set to true
to make the control required, or false
to make it not required.
This method affects the client-side behavior only and does not impact the server-side validation.
Get detailed information about the uploaded files.
An array of objects containing the file ID, the file name, a boolean indicating if the file is new and the HTML element.
// get the file upload control
var fileUpload = ix.util.getUp("<FILEUPLOAD-GUID>");
// get detailed information about the uploaded files
var filesInfo = fileUpload.getFilesInfo();
Gets the image editor associated with the specified file ID from the file upload control.
The ID of the file.
The image editor corresponding to the given file ID.
An image editor is only available for image files that have already been uploaded and only if at least one editor is activated in the file upload control options.
// get the file upload control
var fileUpload = ix.util.getUp("<FILEUPLOAD-GUID>");
// determine the file ID you want to get the image editor for
// you can use the `getValue(true)` or `getFilesInfo()` method to get the ID of an file
// in this example we use the first file
var fileId = fileUpload.getFilesInfo()[0].id;
// get the image editor with the given file id
var imageEditor = fileUpload.getImageEditor(fileId);
Gets all image editors within the file upload control.
An image editor is only available for image files that have already been uploaded and only if at least one editor is activated in the file upload control options.
// get the file upload control
var fileUpload = ix.util.getUp("<FILEUPLOAD-GUID>");
// get all image editors within the file upload control
var imageEditors = fileUpload.getImageEditors();
Get the value of the control.
Optional
verbose: booleanThe value of the control.
verbose
is true, the return value is an object containing detailed information about the files. See "getFilesInfo" method for more info.
Check if the upload is required.