www.dextsolution.com
DEXTUPLOAD
X5
menu toggleReference > component

changeStatus

  • Version 1.0.0.0 or later

  • Explanation

    Change the state of the item corresponding to the given unique ID.

    When the upload of the local resource is completed, the status value is changed to "DONE". Files with status "DONE" will not be uploaded again.

    You can change files to "DONE" immediately without the process of uploading, or you can change the uploaded files to "WAIT" status.

    // Change the item corresponding to the given unique ID to the "WAIT" state. 
    dx.changeStatus(id, "WAIT");
  • Uses

    component.changeStatus(id, status);
  • Parameters

    Name Type Explanation
    id String Unique ID of the item
    status String "WAIT", "DONE"

changeToVirtualFile

  • Version 1.0.0.0 or later

  • Explanation

    Change the local resource item to a virtual file.

    You can also use local resources as virtual files.

    Conversely, it does not provide the ability to change a virtual file to a local file.

    // Change the local file item to the virtual file item.
    dx.changeToVirtualFile(id, "http://.../...", "http://domain/path/...");
    // Enter an empty string when using without URL information. 
    dx.changeToVirtualFile(id, "", "");
    
  • Uses

    component.changeToVirtualFile(id, openUrl, downUrl);
  • Parameters

    Name Type Explanation
    id String Unique ID of local resource item
    openUrl String

    It must be the full web address, including the URL used to open the file, and the schema (http, https).

    If there is no URL to open the file, enter an empty string.

    downUrl String

    The URL used when downloading the file, and the full address including the schema (http, https).

    If you do not have the URL to download the file, enter an empty string.

checkAll

  • Version 1.0.0.0 or later

  • Explanation

    Change all items to checked (or unchecked) status.

    // Change all items to checked state. 
    dx.checkAll(true);

    The checkAll method throws an error if the file is used during the adding process. The process of registering virtual and local files is internally asynchronous. In the case of a local file, when the registration of the file is completed, the onDX5ItemsAdded callback function is called, so checkAll is used after the callback function is executed. If the virtual file is added using addVirtualFile and addVirtualFileList, You can add it to the list.

  • Uses

    component.checkAll(allOrNot);
  • Parameters

    Name Type Explanation
    allOrNot Boolean If it is true, check all of them. If false, change them all to unchecked state.

checkById

  • Version 1.0.0.0 or later

  • Explanation

    Change the item corresponding to the given unique ID to the checked (or unchecked) state.

    // Change the item corresponding to the given unique ID to the checked state. 
    dx.checkById(id, true);
    // Change the item corresponding to the given unique ID to the unchecked state. 
    dx.checkById(id, false);
  • Uses

    component.checkById(id, checked);
  • Parameters

    Name Type Explanation
    id String Unique ID of the item
    checked Boolean If it is true, it is checked. If it is false, it is changed to unchecked state.

checkByIndex

  • Version 1.0.0.0 or later

  • Explanation

    Change the item corresponding to the given order to the checked (or unchecked) state.

    // Change the item corresponding to the given order to the checked state. 
    dx.checkByIndex(index, true);
    // Change the item corresponding to the given order to the unchecked state. 
    dx.checkByIndex(index, false);
  • Uses

    component.checkByIndex(id, checked);
  • Parameters

    Name Type Explanation
    index Number Order of the item
    checked Boolean If it is true, it is checked. If it is false, it is changed to unchecked state.

checkDuplication

  • Version 1.0.0.0 or later

  • Explanation

    Set whether or not to perform duplicate checking.

    If the parameter is true, duplicate checking is performed and duplication is not allowed.

    Duplication occurs when additional files of the same path can be added.

    In the browser, duplicate checks can only compare local resources by name, size, and last modified time.

    In addition, virtual files are not subject to redundancy.

    // Perform duplicate checking every time an item is added. 
    dx.checkDuplication(true);
  • Uses

    component.checkDuplication(enable);
  • Parameters

    Name Type Explanation
    enable Boolean If true, duplicate checking is performed.

clearItems

  • Version 1.0.0.0 or later

  • Explanation

    Remove items.

    If no parameters are specified, all items are removed.

    In DEXTUploadX5, 'delete' and 'remove' are different.

    If a file to be deleted is a virtual file, the virtual file is managed only in a state in which it is deleted internally.

    Using clearItems removes them completely without management.

    // Remove all local file items. 
    dx.clearItems("FILE");
    // Remove all items. 
    dx.clearItems();
  • Uses

    component.clearItems([flag]);
  • Parameters

    Name Type Explanation
    flag String

    [Option]

    • "FILE": Remove all local files.
    • "VIRTUAL": Remove all virtual files.
    • "DVIRTUAL": Removes all deleted virtual files.
    • undefined: Remove all items.

deleteMetaDataById

  • Version 1.0.0.0 or later

  • Explanation

    Delete the metadata of the item corresponding to the given unique ID.

    An item can have multiple metadata in the form of "name[delimiter]value".

    When the metadata is uploaded, it is transmitted to the server and used to transmit other information besides the pure file.

    The virtual file is not uploaded, so metadata is not delivered to the server.

    To delete metadata, you need the name of the metadata to delete.

    dx.setMetaDataById(id, "userid", "ABC");
    // "ABC" is printed. 
    console.log(dx.getMetaDataById(id, "userid"));
    // Delete the metadata. 
    dx.deleteMetaDataById(id, "userid");
    						
  • Uses

    component.deleteMetaDataById(id, name);
  • Parameters

    Name Type Explanation
    id String Unique ID of the item
    name String The name of the metadata.

deleteMetaDataByIndex

  • Version 1.0.0.0 or later

  • Explanation

    Delete the metadata of the item in the given order.

    An item can have multiple metadata in the form of "name[delimiter]value".

    When the metadata is uploaded, it is transmitted to the server and used to transmit other information besides the pure file.

    The virtual file is not uploaded, so metadata is not delivered to the server.

    To delete metadata, you need the name of the metadata to delete.

    // Set metadata to the sixth item. 
    dx.setMetaDataByindex(5, "userid", "ABC");
    // "ABC" is printed. 
    console.log(dx.getMetaDataByIndex(5, "userid"));
    // Delete the metadata. 
    dx.deleteMetaDataByIndex(5, "userid");
    						
  • Uses

    component.deleteMetaDataByIndex(index, name);
  • Parameters

    Name Type Explanation
    index Number Order of the item
    name String The name of the metadata.

executeItem

  • Version 1.0.0.0 or later

  • Explanation

    DEXTUploadX5 does not provide desktop program execution.

    Instead, you can open the target in a new window if the file can be opened with a browser. In general, files that a browser can open are as image-specific.

    The openable target must be a virtual file that has the value of the openUrl property.

    // The download web path must be present in the openUrl property.
    dx.addVirtualFile({ ... name: "bridge_509147.jpg", openUrl: "http://.../service/common-open.do?key=FID0001" });

    If you want to use a script to open the object, you'll need to use the executeItem function.

    // Open the fourth item (virtual file). 
    dx.executeItem(3);
    
  • Uses

    component.executeItem(index);
  • Parameters

    Name Type Explanation
    index Number Order of the item

getAuthkey

  • Version 1.0.0.0 or later

  • Explanation

    Returns the authentication key string.

    The authentication key is set in the authkey property of the dextuploadx5-configuration.js file.

    function onDX5Created(id) {
      var dx = dx5.get(id);
      // The authentication key is printed.
      console.log(dx.getAuthkey());
    }
  • Uses

    authkey = component.getAuthkey();
  • Return

    Authentication key string

getAutoSortingType

  • Version 1.0.0.0 or later

  • Explanation

    Returns the automatic sorting method.

  • Uses

    stype = component.getAutoSortingType();
  • Return

    Automatic alignment method

    Value Explanation
    0 Do not auto-sort.
    1 Automatically perform ascending sorting.
    2 Automatically perform descending sorting.

setAutoSortingType

  • Version 1.0.0.0 or later

  • Explanation

    Sets the automatic sorting method.

    If the setting is 1 or 2, it is automatically sorted every time an item is added.

    // Set to auto-sort in ascending order.
    dx.setAutoSortingType(1);
    // Print the automatic sorting method.
    console.log(dx.getAutoSortingType());
  • Uses

    component.setAutoSortingType(stype);
  • Parameters

    Name Type Explanation
    stype Number

    Automatic alignment method

    Value Explanation
    0 Do not auto-sort.
    1 Automatically perform ascending sorting.
    2 Automatically perform descending sorting.

getCheckedIds

  • Version 1.0.0.0 or later

  • Explanation

    Returns an array containing the unique ID value of the checked items.

    If the parameter value is true, only the local resources except the virtual files are counted.

    // Get an array with the unique ID value of the checked items.
    ids = dx.getCheckedIds();
    // Set the parameter to true to get the unique ID of the checked local resource. 
    ids = dx.getCheckedIds(true);
  • Uses

    ids = component.getCheckedIds([onlyLocal]);
  • Parameters

    Name Type Explanation
    onlyLocal Boolean [Optional] If true, target only local resources.
  • Return

    An array with the unique ID value of the checked items

getCheckedItems

  • Version 1.0.0.0 or later

  • Explanation

    Returns an array containing the checked items.

    If the parameter value is true, only the local resources except the virtual files are counted.

    // Only checked items are returned in an array.
    var checkeds = dx.getCheckedItems();
  • Uses

    items = component.getCheckedItems([onlyLocal]);
  • Parameters

    Name Type Explanation
    onlyLocal Boolean [Optional] If true, target only local resources.
  • Return

    An array with checked items

getCustomHeader

  • Version 2.0.0.0 or later

  • Explanation

    Returns the value corresponding to the given custom header name.

  • Uses

    value = component.getCustomHeader(name);
  • Parameters

    Name Type Explanation
    name String The name of the custom header you want to get.
  • Return

    The value of the custom header. Returns null if none exists.

setCustomHeader

  • Version 2.0.0.0 or later

  • Explanation

    Sets a new custom header or changes the value.

    When uploading or downloading a file, DEXTUploadX5 can send a custom header along with the HTTP request.

    You can set a custom header using the setCustomHeader method and check the header value using the getCustomHeader method.

    Once a custom header has been set, since all requests will include headers, if you do not need them, you can use the removeCustomHeader method to remove the headers already set.

    // Set a custom header. 
    dx.setCustomHeader("X-Third-Party-Name", "DEXTUploadX5");
    // Check the custom header value. 
    value = dx.getCustomHeader("X-Third-Party-Name");
    // Delete the target header. 
    dx.removeCustomHeader("X-Third-Party-Name")

    Header names and values ​​do not encode internally, so if you need to encode, you should do it yourself.

    If you are requesting a cross-domain request, you may not allow user-defined headers on the server side, depending on whether Cross-Origin Resource Sharing (CORS) is configured. Therefore, in order to successfully pass user-defined headers, user-defined headers must be accepted using the Access-Control-Allow-Headers response header or set to match the server (web) platform.

    Do not pass custom headers when uploading or downloading to Amazon S3.

  • Uses

    component.getCustomHeader(name, value);
  • Parameters

    Name Type Explanation
    name String The name of the custom header
    value String The value of the custom header

getEmptyString

  • Version 1.0.0.0 or later

  • Explanation

    Returns a string representing a space.

  • Uses

    splitter = component.getEmptyString();
  • Return

    String for a space, default is "[EMPTY]".

setEmptyString

  • Version 1.0.0.0 or later

  • Explanation

    Sets a string for a space.

    There is nowhere to be used.

    function onDX5Created(id) {
      var dx = dx5.get(id);
      dx.setEmptyString("[e]");
      // Print a space character. 
      console.log(dx.getEmptyString());
    }
  • Uses

    component.setEmptyString(str);
  • Parameters

    Name Type Explanation
    str String String for a space, default is "[EMPTY]".

getEnableColumnSorting

  • Version 1.0.0.0 or later

  • Explanation

    Returns whether sorting is working when clicking on the header column.

  • Uses

    enable = component.getEnableColumnSorting();
  • Return

    True if header sorting is possible, false otherwise

setEnableColumnSorting

  • Version 1.0.0.0 or later

  • Explanation

    Sets whether sorting is working when clicking on the header column.

    // Set enable to sort. 
    dx.setEnableColumnSorting(true);
    console.log(dx.getEnableColumnSorting());
  • Uses

    component.setEnableColumnSorting(enable);
  • Parameters

    Name Type Explanation
    enable Boolean True to enable header sorting, false otherwise

getExtensionFilter

  • Version 1.0.0.0 or later

  • Explanation

    Returns information string for file-extension filtering.

  • Uses

    strFilter = component.getExtensionFilter([reverse]);
  • Parameters

    Name Type Explanation
    reverse Boolean [Optional] If true, the information of inverse filter is returned.
  • Return

    Information string for file-extension filtering

    Examples: *.jpg;*.jpeg;*.gif;*.bmp;*.txt

setExtensionFilter

  • Version 1.0.0.0 or later

  • Explanation

    Set information string for file-extension filtering.

    DEXTUploadX5 can filter based on the file-extension.

    Filter processing is divided into a net filter and an inverse filter.

    • Filter: Only files with file-extensions specified in the filter can be added.
    • Inverse filter: You can not add files with file-extensions specified in the filter.
    function onDX5Created(id) {
        var dx = dx5.get(id);
        // Applying a filter.
        dx.setExtensionFilter("*.jpg;*.jpeg;*.gif;*.bmp;*.txt");
        // Inverse filter example
        dx.setExtensionFilter("*.exe;*.dll;*.js;*.sh;*.com", true);
        // Output the filter information. 
        console.log("white => " + dx.getExtensionFilter());
        console.log("black => " + dx.getExtensionFilter(true));
    }
    

    When the setExtensionFilter function is called again, the existing filter is removed and overwritten.

  • Uses

    component.setExtensionFilter(filterString [, reverse]);
  • Parameters

    Name Type Explanation
    filterString String

    Information string for file-extension filtering

    Examples: *.jpg;*.jpeg;*.gif;*.bmp;*.txt

    reverse Boolean [Option] If true, set inverse filter, false otherwise.

getId

  • Version 3.8.0.0 or later

  • Explanation

    Returns the id of the component.

    var id = dx.getId();
    console.log(id);
  • Uses

    id = component.getId();
  • Return

    Component's id

getItemById

  • Version 1.0.0.0 or later

  • Explanation

    Returns the item corresponding to the given unique ID.

    The items that DEXTUploadX5 can have are local files, local folders, and virtual files.

    Every item has an id property, and you can get an item object using the getItemById function.

    // Get the item. 
    item = dx.getItemById(id);
    // Print the name of the item. 
    console.log(item.name);
  • Uses

    item = component.getItemById(id);
  • Parameters

    Name Type Explanation
    id String Unique ID of the item to be obtained
  • Return

    Item (copy) object

getItemByIndex

  • Version 1.0.0.0 or later

  • Explanation

    Returns the item in the given order.

    The items that DEXTUploadX5 can have are local files and virtual files.

    Every item has a relative order, and you can get an item object using the getItemByIndex function.

    // Get the sixth item. 
    item = dx.getItemByIndex(5);
    // Print the name of the item. 
    console.log(item.name);
  • Uses

    item = component.getItemByIndex(index);
  • Parameters

    Name Type Explanation
    index Number The order of the items to get (from 0)
  • Return

    Item (copy) object

getItemId

  • Version 1.0.0.0 or later

  • Explanation

    Returns the unique ID of the item in the given order.

    // Returns the unique ID value of the fourth item. 
    id = dx.getItemId(3);
    // returns 3 
    index = dx.getItemIndex(id);
  • Uses

    id = component.getItemId(index);
  • Parameters

    Name Type Explanation
    index Number The order of the item
  • Return

    Unique ID of the item corresponding to given order

getItemIds

  • Version 1.0.0.0 or later

  • Explanation

    Returns an array with the unique id value of all items.

    If the parameter value is true, only the local resource (file) except the virtual file is counted.

    The items that DEXTUploadX5 can have are local files and virtual files.

    // Get an array that has a unique ID value of all items. 
    ids = dx.getItemIds();
    // Set the parameter to true to get the unique ID of the local resource. 
    ids = dx.getItemIds(true);
  • Uses

    ids = component.getItemIds([onlyLocal]);
  • Parameters

    Name Type Explanation
    onlyLocal Boolean [Optional] If true, target only local resources.
  • Return

    An array that has a unique ID value for items

getItemIndex

  • Version 1.0.0.0 or later

  • Explanation

    Returns the order of the item corresponding to a given unique ID.

    // Return the unique ID value of the fourth item. 
    id = dx.getItemId(3);
    // Return 3 
    index = dx.getItemIndex(id);
  • Uses

    index = component.getItemIndex(id);
  • Parameters

    Name Type Explanation
    id String Unique ID of the item
  • Return

    Order of the item corresponding to given unique ID

getItems

  • Version 1.0.0.0 or later

  • Explanation

    Returns an array of items.

    The items that DEXTUploadX5 can have are local files and virtual files.

    // Return an array with all items. 
    var all = dx.getItems();
    // Return an array with only local items. 
    var locals = dx.getItems(true);
    // Return an array with all the original items.
    var origins = dx.getItems(false, true);
    

    If the value of the isOrigin parameter is true, the original item element is returned instead of a copy.

    This option is used for multi-component-upload, otherwise you should always use a copy.

  • Uses

    items = component.getItems([onlyLocal, isOrign]);
  • Parameters

    Name Type Explanation
    onlyLocal Boolean [Optional] If true, returns only local resources.
    isOrign Boolean [Optional] Set to true if the elements of the returned array need origins, not copies.
  • Return

    Array of items

getMaxFileCount

  • Version 1.0.0.0 or later

  • Explanation

    Returns the maximum number of files that can be added to the component.

  • Uses

    maxCount = component.getMaxFileCount();
  • Return

    The maximum number of files that can be added to the component. The default value is -1.

setMaxFileCount

  • Version 1.0.0.0 or later

  • Explanation

    Sets the maximum number of files that can be added to a component.

    You can limit the maximum number of files to upload.

    A value of -1 means that no restriction is made.

    function onDX5Created(id) {
      var dx = dx5.get(id);
      // You can add up to 10 files. 
      dx.setMaxFileCount(10);
      // If you want to add up to 10 including virtual files, enter the value of the second parameter as true. 
      // That is, the number of local files (10 - the number of virtual files) can be added. 
      dx.setMaxFileCount(10, true);
      // Print the maximum number of files that can be added to the component. 
      console.log(dx.getMaxFileCount());
    }
  • Uses

    component.setMaxFileCount(count [, withVF]);
  • Parameters

    Name Type Explanation
    count Number The maximum number, the default is -1.
    withVF Boolean [Option] If true, calculate with virtual file. The default value is false.

getMaxFileSize

  • Version 1.0.0.0 or later

  • Explanation

    Returns the maximum size of individual files that can be added to the component.

  • Uses

    maxSize = component.getMaxFileSize();
  • Return

    The maximum size (in bytes) of individual files that can be added to the component. The default value is -1.

setMaxFileSize

  • Version 1.0.0.0 or later

  • Explanation

    Sets the maximum size of individual files that can be added to the component.

    You can disable the registration of files over a certain size.

    A value of -1 means that no restriction is made.

    function onDX5Created(id) {
      var dx = dx5.get(id);
      // Files over 100MB can not be added. 
      dx.setMaxFileSize(1024 * 1024 * 100);
      // Print the maximum size of individual files that can be added to the component. 
      console.log(dx.getMaxFileSize());
    }

    Uploading will fail if the maximum amount is too high to be received by the server.

    For OROF and ORAF upload methods, individual files can not exceed approximately 2GB.

    Uploading a large file may increase the share of server resources, which may not be desirable at the same time.

    In general, there is no reason to upload large files, so it is recommended that you limit the available capacity.

  • Uses

    component.setMaxFileSize(size);
  • Parameters

    Name Type Explanation
    size Number The maximum file size in bytes. The default value is -1.

getMaxTotalSize

  • Version 1.0.0.0 or later

  • Explanation

    Returns the maximum size of total files that can be added to the component.

  • Uses

    maxTotalSize = component.getMaxTotalSize();
  • Return

    The maximum allowed size of total files in bytes. The default value is -1.

setMaxTotalSize

  • Version 1.0.0.0 or later

  • Explanation

    Sets the maximum size of total files that can be added to the component.

    A value of -1 means that no restriction is made.

    function onDX5Created(id) {
      var dx = dx5.get(id);
      // It can not add if the total file size exceeds 300MB. 
      dx.setMaxTotalSize(1024 * 1024 * 300);
      // Print the maximum value of the total files size that can be added to the component.
      console.log(dx.getMaxTotalSize());
    }

    Uploading will fail if the maximum amount is too high to be received by the server.

    For the OROF and ORAF upload methods, the total size of the entire file can not exceed approximately 2GB.

    If the amount of data to be uploaded is large, the server resource occupation rate may increase, and concurrent processing may not be desired.

    In general, there is no reason to upload large data, so it is recommended to limit the available capacity.

  • Uses

    component.setMaxTotalSize(tsize [, withVF]);
  • Parameters

    Name Type Explanation
    tsize Number The maximum allowed size of total files in bytes. The default value is -1.
    withVF Boolean [Option] If true, calculate with virtual file. The default value is false.

getMetaDataById

  • Version 1.0.0.0 or later

  • Explanation

    Returns the metadata value of the item corresponding to the given unique ID.

  • Uses

    metaValue = component.getMetaDataById(id, name);
  • Parameters

    Name Type Explanation
    id String Unique ID of the item
    name String The name of the metadata
  • Return

    The metadata value of the given name

setMetaDataById

  • Version 1.0.0.0 or later

  • Explanation

    Sets the metadata value of the item corresponding to the given unique ID.

    An item can have multiple metadata in the form of "name[delimiter]value".

    When the metadata is uploaded, it is transmitted to the server and used to transmit other information besides the pure file.

    virtual file is not uploaded, so metadata is not delivered to the server.

    dx.setMetaDataById(id, "userid", "ABC");
    // Print "ABC"
    console.log(dx.getMetaDataById(id, "userid"));
  • Uses

    component.setMetaDataById(id, name, value);
  • Parameters

    Name Type Explanation
    id String Unique ID of the item
    name String The name of the metadata
    value String The value of the metadata

getMetaDataByIndex

  • Version 1.0.0.0 or later

  • Explanation

    Returns the metadata value of the item in the given order.

  • Uses

    metaValue = component.getMetaDataByIndex(index, name);
  • Parameters

    Name Type Explanation
    index Number Order of the item
    name String The name of the metadata
  • Return

    The metadata value of the given name

setMetaDataByIndex

  • Version 1.0.0.0 or later

  • Explanation

    Sets the metadata value of the item in the given order.

    An item can have multiple metadata in the form of "name[delimiter]value".

    When the metadata is uploaded, it is transmitted to the server and used to transmit other information besides the pure file.

    The virtual file is not uploaded, so metadata is not delivered to the server.

    // Set metadata in the sixth item. 
    dx.setMetaDataByIndex(5, "userid", "ABC");
    // "ABC" is printed.
    console.log(dx.getMetaDataByIndex(5, "userid"));
  • Uses

    component.setMetaDataByIndex(index, name, value);
  • Parameters

    Name Type Explanation
    index Number The order of the item
    name String The name of the metadata
    value String The value of the metadata

getMinFileSize

  • Version 1.0.0.0 or later

  • Explanation

    Returns the minimum size of individual files that can be added to the component.

  • Uses

    minSize = component.getMinFileSize();
  • Return

    The minimum size (in bytes) of the individual files that can be added to the component; the default is -1.

setMinFileSize

  • Version 1.0.0.0 or later

  • Explanation

    Sets the minimum size of individual files that can be added to the component.

    You can disable the registration of files under a specific size.

    A value of -1 means that no restriction is made.

    function onDX5Created(id) {
      var dx = dx5.get(id);
      // Files under 1MB can not be added. 
      dx.setMinFileSize(1024 * 1024);
      // Print the minimum size of individual files that can be added to the component. 
      console.log(dx.getMinFileSize());
    }
  • Uses

    component.setMinFileSize(size);
  • Parameters

    Name Type Explanation
    size Number The individual minimum size in bytes. The default value is -1.

getPreviewBackgroundColor

  • Version 1.2.0.0 or later

  • Explanation

    Returns the background color of the preview viewer.

  • Uses

    color = component.getPreviewBackgroundColor();
  • Return

    Background color string

setPreviewBackgroundColor

  • Version 1.2.0.0 or later

  • Explanation

    Sets the background color of the preview viewer.

    The background color follows hexadecimal notation (#FFFFFF).

    // Set to true to use the viewer. 
    dx.setPreviewEnable(true);
    // Set the background color. 
    dx.setPreviewBackgroundColor("#ff0000");
    // Set the preview to be done using the built-in viewer. (Default 1)
    dx.setPreviewMethod(1);
    // If the first file is a local image file, run the built-in viewer.
    dx.preview(0);
    
  • Uses

    component.setPreviewBackgroundColor(color);
  • Parameters

    Name Type Explanation
    color String Background color string

getPreviewMethod

  • Version 1.2.0.0 or later

  • Explanation

    Returns the preview method.

  • Uses

    method = component.getPreviewMethod();
  • Return

    Preview method. 1 means built-in viewer, 2 means call event

setPreviewMethod

  • Version 1.2.0.0 or later

  • Explanation

    Set the preview method.

    1, use the built-in viewer to display the image on the screen.

    2, a way to invoke an event is provided, which can be used by the developer to construct his or her own preview screen.

    // Set to true to use the viewer. 
    dx.setPreviewEnable(true);
    // Set the background color.
    dx.setPreviewBackgroundColor("#ff0000");
    // Set the event method.
    dx.setPreviewMethod(2);
    // If the first file is a local image file, occur the preview event. 
    dx.preview(0);
    // This is a callback function to be called when a preview event occurs.
    function onDX5Preview(id, itemIndex, itemId, itemSource) {
      ...
      if (itemSource) {
        target.src = itemSource;
      }
    }
    
  • Uses

    component.setPreviewMethod(method);
  • Parameters

    Name Type Explanation
    method Number Preview method. 1 means built-in viewer, 2 means call event

getRemovedFileById

  • Version 1.0.0.0 or later

  • Explanation

    Returns the virtual file that is a deleted state corresponding to a given unique ID.

    // Get the deleted file (item). 
    item = dx.getRemovedFileById(id);
    // Print the name of the file.
    console.log(item.name);
  • Uses

    item = component.getRemovedFileById(id);
  • Parameters

    Name Type Explanation
    id String Unique ID of the item to be obtained
  • Return

    Deleted virtual file (copy)

getRemovedFileIds

  • Version 1.0.0.0 or later

  • Explanation

    Returns an array containing the unique ID value of deleted virtual files

    When a virtual file is deleted, it is not completely removed, but is changed to deleted state.

    // Get an array with the unique ID value of deleted virtual files.
    ids = dx.getRemovedFileIds();
  • Uses

    ids = component.getRemovedFileIds();
  • Return

    An array with the unique ID value of deleted virtual files.

getRemovedFiles

  • Version 1.0.0.0 or later

  • Explanation

    Returns an array containing the deleted virtual files.

    When a virtual file is deleted, it is not completely removed, but is changed to deleted state.

    // Return an array containing the deleted files. 
    removeds = dx.getRemovedFiles();
  • Uses

    removeds = component.getRemovedFiles();
  • Return

    An array with deleted virtual files

getResponses

  • Version 1.0.0.0 or later

  • Explanation

    Returns the response data received from the server after uploading.

    The response data can be obtained after the onDX5UploadCompleted callback function is called.

    When the local resource is uploaded, the server records the response data, and when all uploads are completed, the onDX5UploadCompleted function is called. After the uploaded event occurs, you can get the response data using the getResponses function.

    The response data is a string.

    In the "ORAF" upload method, only one string is returned, so the length of the returned array is 1.

    When the "OROF", "EXTS" and "AWSS3" upload methods are used, the number of uploaded files is returned, so the length of the returned array is the same as the number of files.

    If a parameter is given, it returns the response string corresponding to the parameter sequence, not the array.

    function onDX5UploadCompleted(id) {
      // Return the first response string.
      var response = dx.getResponses(0);
      console.log(response);
    }
  • Uses

    responses = component.getResponses([index]);
  • Parameters

    Name Type Explanation
    index Number [Optional] the order of response data
  • Return

    • Given a parameter: the response string corresponding to the given order
    • Without parameters: array with all response strings

getSelectedCount

  • Version 1.0.0.0 or later

  • Explanation

    Returns the number of selected items.

    If the parameter value is true, only the local resources except the virtual files are counted.

    // Get the number of selected items. 
    count = dx.getSelectedCount();
    // Set the parameter to true to get the number of selected local resources. 
    count = dx.getSelectedCount(true);
  • Uses

    count = component.getSelectedCount([onlyLocal]);
  • Parameters

    Name Type Explanation
    onlyLocal Boolean [Optional] If true, target only local resources.
  • Return

    The number of selected items

getSelectedIndices

  • Version 1.0.0.0 or later

  • Explanation

    Returns an array containing the order values ​​of the selected items.

    If the parameter value is true, only the local resources except the virtual files are counted.

    // Get an array with the order values of the selected items. 
    indices = dx.getSelectedIndices();
    // Set the parameter to true to get the order of the selected local resources.
    indices = dx.getSelectedIndices(true);
  • Uses

    indices = component.getSelectedIndices([onlyLocal]);
  • Parameters

    Name Type Explanation
    onlyLocal Boolean [Optional] If true, target only local resources.
  • Return

    An array conaining the order values of the selected items

getSelectedItemIds

  • Version 1.0.0.0 or later

  • Explanation

    Returns an array containing the unique ID values of the selected items.

    If the parameter value is true, only the local resources except the virtual files are counted.

    // Get an array with the unique ID values of the selected items. 
    ids = dx.getSelectedItemIds();
    // Set the parameter to true to get the unique ID values of the selected local resources.
    ids = dx.getSelectedItemIds(true);
  • Uses

    ids = component.getSelectedItemIds([onlyLocal]);
  • Parameters

    Name Type Explanation
    onlyLocal Boolean [Optional] If true, target only local resources.
  • Return

    An array with the unique ID values of the selected items

getSelectedItems

  • Version 1.0.0.0 or later

  • Explanation

    Returns an array containing the selected items.

    If the parameter value is true, only the local resources except the virtual files are counted.

    // Only the selected items are returned in an array.
    var selecteds = dx.getSelectedItems();
  • Uses

    items = component.getSelectedItems([onlyLocal]);
  • Parameters

    Name Type Explanation
    onlyLocal Boolean [Optional] If true, target only local resources.
  • Return

    [Optional] If true, target only local resources.

getSplitString

  • Version 1.0.0.0 or later

  • Explanation

    Returns the delimiter string.

  • Uses

    splitter = component.getSplitString();
  • Return

    The delimiter string, default is "[SPLT]".

setSplitString

  • Version 1.0.0.0 or later

  • Explanation

    Sets the delimiter string.

    When DEXTUploadX5 sends metadata to the server, it sends string data including the delimiter string.

    function onDX5Created(id) {
      var dx = dx5.get(id);
      // Set the delimiter character to the pipeline character (|). 
      dx.setSplitString("|");
      // Print character for delimiter. 
      console.log(dx.getSplitString());
    }
  • Uses

    component.setSplitString(str);
  • Parameters

    Name Type Explanation
    str String The delimiter string, default is "[SPLT]".

getSupportPHP

  • Version 1.0.0.0 or later

  • Explanation

    Returns whether the PHP environment is supported.

  • Uses

    enable = component.getSupportPHP();
  • Return

    Whether to support the PHP environment

setSupportPHP

  • Version 1.0.0.0 or later

  • Explanation

    Sets whether PHP is supported.

    The DEXTUploadX5 product sends the file as 'DEXTUploadX5_FileData' form name.

    If you use the ORAF transfer method, even if you upload multiple files at the same time, the form names are the same.

    In PHP, however, if you want to load multiple files simultaneously with the same form name, you must set the form name as an array.

    That is, you must name the form in array format like 'DEXTUploadX5_FileData[]'.

    function onDX5Created(id) {
      var dx = dx5.get(id);
      // Set to true if it is PHP. 
      dx.setSupportPHP(true);
    }

    In case of ORAF which is the default upload method, it should be set to PHP environment. However, the OROF and EXTS upload methods do not need to use the setSupportPHP function because only one file information is passed in one request.

  • Uses

    component.setSupportPHP(enable);
  • Parameters

    Name Type Explanation
    enable Boolean True to support the PHP environment, false otherwise

getTotalFileSize

  • Version 1.0.0.0 or later

  • Explanation

    Returns the sum of the sizes of the files added to the component.

    If the parameter value is true, only the local resources except the virtual file are counted.

    function onDX5Created(id) {
      var dx = dx5.get(id);
      // Print the sum of all file sizes. 
      console.log(dx.getTotalFileSize());
    }
  • Uses

    totalSize = component.getTotalFileSize([onlyLocal]);
  • Parameters

    Name Type Explanation
    onlyLocal Boolean [Optional] If true, target only local resources.
  • Return

    Sum of total file sizes

getTotalItemCount

  • Version 1.0.0.0 or later

  • Explanation

    Returns the number of items added to the component.

    If the parameter value is true, only the local resources except the virtual files are counted.

    // Print the number of items. 
    console.log(dx.getTotalItemCount());
  • Uses

    count = component.getTotalItemCount([onlyLocal]);
  • Parameters

    Name Type Explanation
    onlyLocal Boolean [Optional] If true, target only local resources.
  • Return

    [Optional] If true, target only local resources.

getTotalLocalFileCount

  • Version 1.0.0.0 or later

  • Explanation

    Returns the number of local files.

    The items that DEXTUploadX5 can have are local files and virtual files.

    The local file has the type property of the item that can be obtained from the component is "FILE".

    // Print the number of local files. 
    console.log(dx.getTotalLocalFileCount());
  • Uses

    count = component.getTotalLocalFileCount();
  • Return

    Number of local files

getTotalRemovedFileCount

  • Version 1.0.0.0 or later

  • Explanation

    Returns the number of deleted virtual files.

    When a virtual file is deleted, it is not completely removed, but is changed to deleted state.

    // returns the number of deleted virtual files. 
    count = dx.getTotalRemovedFileCount();
    console.log(count);
  • Uses

    count = component.getTotalRemovedFileCount();
  • Return

    Number of virtual files deleted

getTotalRemovedFileSize

  • Version 1.0.0.0 or later

  • Explanation

    Returns the sum of the sizes of deleted virtual files.

    When a virtual file is deleted, it is not completely removed, but is changed to deleted state.

    // Returns the sum of the size of deleted virtual files.
    rsize = dx.getTotalRemovedFileSize();
    console.log(rsize);
  • Uses

    rsize = component.getTotalRemovedFileSize();
  • Return

    Sum the sizes of the virtual files deleted

getTotalVirtualFileCount

  • Version 1.0.0.0 or later

  • Explanation

    Returns the number of virtual files.

    The items that DEXTUploadX5 can have are local files and virtual files.

    The virtual file has the type attribute "VIRTUAL" of the item that can be obtained from the component.

    Virtual files can be added using the addVirtualFile, addVirtualFileList functions.

    // Print the number of virtual files. 
    console.log(dx.getTotalVirtualFileCount());
  • Uses

    count = component.getTotalVirtualFileCount();
  • Return

    Number of virtual files

getVersion

  • Version 1.0.0.0 or later

  • Explanation

    Returns the component version.

    function onDX5Created(id) {
      var dx = dx5.get(id);
      // Print the component version.
      console.log(dx.getVersion());
    }
  • Uses

    strVersion = component.getVersion();
  • Return

    Version string

hasUploadableItems

  • Version 1.0.0.0 or later

  • Explanation

    Returns whether there is a target that can be uploaded.

    function upload(id) {
      var dx = dx5.get(id);
      // Confirm that there is something to upload and then start uploading.
      if (dx.hasUploadableItems()) {
        // Start uploading.
      } else {
        alert("There is nothing to upload");
      }
    }
  • Uses

    has = component.hasUploadableItems();
  • Return

    True if there is an uploadable target, false otherwise

isAllowNoExtension

  • Version 1.0.0.0 or later

  • Explanation

    Returns whether to allow adding a file without file-extension.

  • Uses

    allow = component.isAllowNoExtension();
  • Return

    True to allow files without file-extension, false if not

setAllowNoExtension

  • Version 1.0.0.0 or later

  • Explanation

    Sets whether to allow adding files without file-extension.

    function onDX5Created(id) {
      var dx = dx5.get(id);
      // Prevent adding files without file-extension. 
      dx.setAllowNoExtension(false);
      // Print whether to allow adding files without file-extension. 
      console.log(dx.isAllowNoExtension());
    }
  • Uses

    component.setAllowNoExtension(allow);
  • Parameters

    Name Type Explanation
    allow Boolean Enabled if true; false if not

isPreviewEnable

  • Version 1.0.0.0 or later

  • Explanation

    Returns whether to use the preview viewer.

  • Uses

    enable = component.isPreviewEnable();
  • Return

    true, false

setPreviewEnable

  • Version 1.0.0.0 or later

  • Explanation

    Sets whether to use preview viewer.

    If the target is an image file and preview is available, it provides a preview function on the screen or event.

    Supported formats are as follows.

    • JPG, GIF, PNG, BMP
    // Set to true to use the viewer.
    dx.setPreviewEnable(true);
    // Set the background color.
    dx.setPreviewBackgroundColor("#ff0000");
    // Set whether using the built-in viewer. (Default 1) 
    dx.setPreviewMethod(1);
    // If the first file is a local image file, run the built-in viewer. 
    dx.preview(0);
    
  • Uses

    component.setPreviewEnable(enable);
  • Parameters

    Name Type Explanation
    enable Boolean True to use the preview viewer, false otherwise

isSelectedByIndex

  • Version 1.0.0.0 or later

  • Explanation

    Returns whether the item in the given order is in the selected state.

    // Change the sixth item to the selected state. 
    dx.selectByIndex(5);
    // Output whether the sixth item is selected.
    console.log(dx.isSelectedByIndex(5));
  • Uses

    selected = component.isSelectedByIndex(index);
  • Parameters

    Name Type Explanation
    index Number Order of the item
  • Return

    True if selected, false otherwise

lockById

  • Version 1.0.0.0 or later

  • Explanation

    Change the item corresponding to the given unique ID to the locked state.

    If the item is locked, the target can not be deleted.

    // Change the target to the locked state.
    dx.lockById(id);
    // Release the lock state of the target.
    dx.unlockById(id);
  • Uses

    component.lockById(id);
  • Parameters

    Name Type Explanation
    id String Unique ID of the item

unlockById

  • Version 1.0.0.0 or later

  • Explanation

    Unlocks the item corresponding to the given unique ID.

    If the item is locked, the target can not be deleted.

    // Change the target to the locked state.
    dx.lockById(id);
    // Release the lock state of the target. 
    dx.unlockById(id);
  • Uses

    component.unlockById(id);
  • Parameters

    Name Type Explanation
    id String Unique ID of the item

lockByIndex

  • Version 1.0.0.0 or later

  • Explanation

    Change the item corresponding to the given order to the locked state.

    If the item is locked, the target can not be deleted.

    // Change the target to the locked state.
    dx.lockByIndex(5);
    // Release the lock state of the target.
    dx.lockByIndex(5);
  • Uses

    component.lockByIndex(index);
  • Parameters

    Name Type Explanation
    id index Order of the item

unlockByIndex

  • Version 1.0.0.0 or later

  • Explanation

    Release the lock status of the item in the given order.

    If the item is locked, the target can not be deleted.

    // Change the target to the locked state. 
    dx.lockByIndex(5);
    // Release the lock state of the target.
    dx.lockByIndex(5);
  • Uses

    component.unlockByIndex(index);
  • Parameters

    Name Type Explanation
    id index Order of the item

preview

  • Version 1.2.0.0 or later

  • Explanation

    If the local file to be added is an image file, a viewer is provided for previewing the target file.

    If you use the built-in viewer, a preview area is created with the browser as a full screen.

    On the other hand, if the preview method is set to the event calling method, a preview screen configuration desired by the developer becomes possible.

    Only local files can be previewed.

    // Set to true to use the viewer.
    dx.setPreviewEnable(true);
    // Set the background color.
    dx.setPreviewBackgroundColor("#ff0000");
    // Set whether using the built-in viewer. (Default 1) 
    dx.setPreviewMethod(1);
    // If the first file is a local image file, run the built-in viewer. 
    dx.preview(0);
    
  • Uses

    component.preview(index);
  • Parameters

    Name Type Explanation
    index Number Order of the item

purgeRemovedVirtual

  • Version 1.0.0.0 or later

  • Explanation

    Remove the virtual file corresponding to the given unique ID.

    When deleting an item, if the target is a virtual file, it is not deleted immediately.

    On the other hand, local resources are completely removed without changing the state.

    Virtual files that are kept in this deleted state can be completely removed using the function purgeRemovedVirtual.

    // Remove the virtual file corresponding to the given unique ID. 
    dx.purgeRemovedVirtual(id);
  • Uses

    component.purgeRemovedVirtual(id);
  • Parameters

    Name Type Explanation
    id String Unique ID of the virtual file to be removed

removeAll

  • Version 1.0.0.0 or later

  • Explanation

    Deletes or removes all items.

    When deleting an item, if the target is a virtual file, it is not deleted immediately.

    On the other hand, local resources are completely removed without changing the state.

    // Delete all items. 
    dx.removeAll();
    // Remove all items (even for virtual files). 
    dx.removeAll(true);
  • Uses

    component.removeAll([perma[, fireEvent]]);
  • Parameters

    Name Type Explanation
    perma Boolean [Optional] If true, remove the target file without deleting it when it is a virtual file.
    fireEvent (version 1.4.1.0 or later) Boolean [Optional] If true, an event occurs during the deletion. The default value is false.

removeById

  • Version 1.0.0.0 or later

  • Explanation

    Deletes or removes the item corresponding to the given unique ID.

    When deleting an item, if the target is a virtual file, it is not deleted immediately.

    On the other hand, local resources are completely removed without changing the state.

    // Delete the item corresponding to the given unique ID.
    dx.removeById(id);
    // Remove the item corresponding to the given unique ID (even if the virtual file is completely removed).
    dx.removeById(id, true);
  • Uses

    component.removeById(id [, perma[, fireEvent]]);
  • Parameters

    Name Type Explanation
    id String Unique ID of the item you want to delete
    perma Boolean [Optional] If true, remove the target file without deleting it when it is a virtual file.
    fireEvent (version 1.4.1.0 or later) Boolean [Optional] If true, an event occurs during the deletion. The default value is false.

removeByIndex

  • Version 1.0.0.0 or later

  • Explanation

    Deletes or removes the item corresponding to the given order.

    When deleting an item, if the target is a virtual file, it is not deleted immediately.

    On the other hand, local resources are completely removed without changing the state.

    // Delete the sixth item. 
    dx.removeByIndex(5);
    // Remove the sixth item (even if the virtual file is completely removed). 
    dx.removeByIndex(5, true);
  • Uses

    component.removeByIndex(index [, perma[, fireEvent]]);
  • Parameters

    Name Type Explanation
    index Number Order of the item
    perma Boolean [Optional] If true, remove the target file without deleting it when it is a virtual file.
    fireEvent (version 1.4.1.0 or later) Boolean [Optional] If true, an event occurs during the deletion. The default value is false.

removeChecked

  • Version 1.0.0.0 or later

  • Explanation

    Deletes or removes all checked items.

    When deleting an item, if the target is a virtual file, it is not deleted immediately.

    On the other hand, local resources are completely removed without changing the state.

    // Delete all checked items.
    dx.removeChecked();
    // Remove all checked items (even for virtual files). 
    dx.removeChecked(true);
  • Uses

    component.removeChecked([perma[, fireEvent]]);
  • Parameters

    Name Type Explanation
    perma Boolean [Optional] If true, remove the target file without deleting it when it is a virtual file.
    fireEvent (version 1.4.1.0 or later) Boolean [Optional] If true, an event occurs during the deletion. The default value is false.

removeCustomHeader

  • Version 2.0.0.0 or later

  • Explanation

    Delete the custom header.

    When uploading or downloading a file, DEXTUploadX5 can send a custom header along with the HTTP request.

    You can set a custom header using the setCustomHeader method and check the header value using the getCustomHeader method.

    Once a custom header has been set, since all requests will include headers, if you do not need them, you can use the removeCustomHeader method to remove the headers already set.

    // Set a custom header. 
    dx.setCustomHeader("X-Third-Party-Name", "DEXTUploadX5");
    // Get a custom header value. 
    value = dx.getCustomHeader("X-Third-Party-Name");
    // Delete the target header. 
    dx.removeCustomHeader("X-Third-Party-Name")

    Header names and values ​​do not encode internally, so if you need to encode, you should do it yourself.

    If you are requesting a cross-domain request, you may not allow user-defined headers on the server side, depending on whether Cross-Origin Resource Sharing (CORS) is configured. Therefore, in order to successfully pass user-defined headers, user-defined headers must be accepted using the Access-Control-Allow-Headers response header or set to match the server (web) platform.

  • Uses

    component.removeCustomHeader(name);
  • Parameters

    Name Type Explanation
    name String The name of the custom header to delete

removeSelected

  • Version 1.0.0.0 or later

  • Explanation

    Deletes or removes all selected items.

    When deleting an item, if the target is a virtual file, it is not deleted immediately.

    On the other hand, local resources are completely removed without changing the state.

    // Delete all selected items. 
    dx.removeSelected();
    // Reomve all selected items (even for virtual files). 
    dx.removeSelected(true);
  • Uses

    component.removeSelected([perma[, fireEvent]]);
  • Parameters

    Name Type Explanation
    perma Boolean [Optional] If true, remove the target file without deleting it when it is a virtual file.
    fireEvent (version 1.4.1.0 or later) Boolean [Optional] If true, an event occurs during the deletion. The default value is false.

revokeAllVirtualFiles

  • Version 1.0.0.0 or later

  • Explanation

    Recovers all deleted virtual files.

    When deleting an item, if the target is a virtual file, it is not deleted immediately.

    On the other hand, local resources are completely removed without changing the state.

    To recover all the virtual files that are kept in this deleted state, use the revokeAllVirtualFiles function.

    // Recover all deleted virtual files. 
    dx.revokeAllVirtualFiles();
  • Uses

    component.revokeAllVirtualFiles();

revokeVirtualFile

  • Version 1.0.0.0 or later

  • Explanation

    Recovers the deleted virtual file corresponding to a given unique ID.

    When deleting an item, if the target is a virtual file, it is deleted and not deleted immediately.

    On the other hand, local resources are completely removed without changing the state.

    To restore a virtual file that is being archived in this way, use the revokeVirtualFile function.

    // Recover the deleted virtual file corresponding to the given ID. 
    dx.revokeVirtualFile(id);
  • Uses

    component.revokeVirtualFile(id);
  • Parameters

    Name Type Explanation
    id String The unique ID of the virtual file being deleted

selectAll

  • Version 1.0.0.0 or later

  • Explanation

    Changes all items to the selected state.

    // Change all items to selected state. 
    dx.selectAll();
    // Change all items to deselected state. 
    dx.unselectAll();
  • Uses

    component.selectAll();

unselectAll

  • Version 1.0.0.0 or later

  • Explanation

    Changes all items to deselected state.

    // Change all items to selected state. 
    dx.selectAll();
    // Change all items to deselected state. 
    dx.unselectAll();
  • Uses

    component.unselectAll();

selectByIndex

  • Version 1.0.0.0 or later

  • Explanation

    Changes the item corresponding to the given order to the selected state.

    // Change the sixth item to the selected state. 
    dx.selectByIndex(5);
    // Change the sixth item to the selected state.
    dx.unselectByIndex(5);
  • Uses

    component.selectByIndex(index);
  • Parameters

    Name Type Explanation
    index Number Order of the item

unselectByIndex

  • Version 1.0.0.0 or later

  • Explanation

    Changes the item corresponding to the given order to the unselected state.

    // Change the sixth item to the selected state. 
    dx.selectByIndex(5);
    // Change the sixth item to the unselected state.
    dx.unselectByIndex(5);
  • Uses

    component.unselectByIndex(index);
  • Parameters

    Name Type Explanation
    index Number Order of the item

setFilterSilence

  • Version 1.0.0.0 or later

  • Explanation

    Sets whether to block all files or not.

    If the file to be added violates a predefined filter, the file is blocked.

    If the total file size limit is 10MB, the file to be added is 8MB, 1MB, 3MB, or 4MB, the component queries whether to add two files(8MB, 1MB).

    If the setFilterSilence function is set to true, all file are canceled without this query.

    function onDX5Created(id) {
      var dx = dx5.get(id);
      ...
      // If filtering is done according to the filtering condition, block all (do not add). 
      dx.setFilterSilence(true);
    }
  • Uses

    component.setFilterSilence(enable);
  • Parameters

    Name Type Explanation
    enable Boolean If true, all files are blocked without user interactive when filtered. The default value is true.

setSortPriorityVirtualFile

  • Version 1.1.0.0 or later

  • Explanation

    When sorting, sets whether to make virtual files the top priority.

    If you make virtual files the top priority, the virtual files are always placed first, regardless of ascending or descending order.

    // Make the virtual files the top priority when sorting. 
    dx.setSortPriorityVirtualFile(true);
  • Uses

    component.setSortPriorityVirtualFile(enable);
  • Parameters

    Name Type Explanation
    enable Boolean When sorting, true if the virtual files are the first priority, false if not.

setUIStyle

  • Version 1.0.0.0 or later

  • Explanation

    Changes the GUI style.

    The setUIStyle function sets the style property of the JSON object with the style property specified.

    dx.setUIStyle({
     headerVisible: false, statusBarVisible: false, borderVisible: true
    });
    
  • Uses

    component.setUIStyle({ /* UI properties */ });
  • Parameters

    Name Type Explanation
    headerVisible Boolean

    True to show header, false otherwise.

    It does not affect TILE or SINGLE type.

    statusBarVisible Boolean

    True to show the status bar, false otherwise.

    It does not affect SINGLE type.

    checkerVisible Boolean

    True to show the checker, false otherwise.

    Checkers are checkbox elements that can change the check state.

    It does not affect SINGLE type.

    headerSolidColor String

    Sets the background color (hexadecimal notation) of the header.

    ex) headerSolidColor: "#FF00FF"

    It does not affect TILE or SINGLE type.

    statusBarSolidColor String

    Set the background color (hexadecimal notation) of the status bar.

    ex) statusBarSolidColor: "#FF00FF"

    It does not affect SINGLE type.

    headerGradient String

    Applies gradients to headers.

    Direction (VERTICAL | HORIZONTAL), start color, end color.

    ex) headerGradient: "VERTICAL #FF0000 #00FF00"

    ex) headerGradient: "HORIZONTAL #FFFFFF #EFEFEF"

    It does not affect TILE or SINGLE type.

    headerFontName String

    Sets the font used in LIST, GRID-style headers.

    ex) headerFontName: "Tahoma"

    You can only use Web Safe fonts.

    headerFontColor String

    Sets the color (hexadecimal notation) of the font in the header.

    ex) headerFontColor: "#FF00FF"

    It does not affect TILE or SINGLE type.

    itemFontName String

    Sets the font in the item.

    ex) itemFontName: "Tahoma"

    You can only use Web Safe fonts.

    itemFontColor String

    Sets the font color (hexadecimal notation) in the item.

    ex) itemFontColor: "#FF00FF"

    statusBarFontName String

    Sets the font used for LIST, TILE, and GRID-style status bars.

    ex) statusBarFontName: "Tahoma"

    You can only use Web Safe fonts.

    statusBarFontColor String

    Sets the font color (hexadecimal notation) in the status bar.

    ex) statusBarFontColor: "#FF00FF"

    It does not affect SINGLE type.

    headerHeight Number

    Sets the height of the header.

    ex) headerHeight: 28

    It does not affect TILE or SINGLE type.

    borderVisible Boolean True to represent the outline of the component; false otherwise.
    itemHeight Number

    Sets the height of the item.

    ex) headerHeight: 28

    It does not affect TILE or SINGLE type.

    backgroundColor String

    Sets the background color (hexadecimal notation).

    ex) backgroundColor: "#FF00FF"

    backgroundImage String

    Displays the image in the center of the background.

    Specify the web path of the image to be displayed, and the horizontal and vertical size of the target image.

    ex) backgroundImage: "http://image_address 500 200"

    It does not affect SINGLE type.

    tileColumnCount Number

    When the UI type is TILE, set the number of items to be displayed on the line.

    Affects only the TILE type.

    openButtonVisible Boolean

    True to represent the open icon button, false otherwise

    Only virtual files with an openUrl property value are processed.

    downloadButtonVisible Boolean

    True to represent the download icon button, false otherwise

    Only virtual files with downUrl property value are processed.

    filterVisible (version 1.4.0.0 or later) Boolean

    True to represent the filter region, false otherwise.

    gridLineVisible (version 1.4.1.0 or later) Boolean

    True to represent item separator lines, false otherwise

    gridLineColor (version 1.4.1.0 or later) String

    Sets the item separator color (hexadecimal notation).

    ex) gridLineColor: "#FF00FF"

    borderColor (version 1.4.1.0 or later) String

    Sets the outline color (hexadecimal notation).

    ex) borderColor: "#FF00FF"

    itemBackColor (version 1.4.1.0 or later) String

    Set the item background color (hexadecimal notation).

    ex) itemBackColor: "#FF00FF"

    headerLineColor (version 1.4.1.0 or later) String

    Sets the color of the header line below the header (in hexadecimal notation).

    ex) headerLineColor: "#FF00FF"

    columnLineColor (version 1.4.1.0 or later) String

    Sets header column color (hexadecimal notation).

    ex) columnLineColor: "#FF00FF"

    statusBarLineColor (version 1.4.1.0 or later) String

    Sets the color of the top bar of the status bar (hexadecimal notation).

    ex) statusBarLineColor: "#FF00FF"

    scrollRailColor (version 4.1.0.0 or later) String

    Sets the color of the rail of the scroll bar (hexadecimal notation).

    ex) scrollRailColor: "#FF00FF"

    scrollHandleColor (version 4.1.0.0 or later) String

    Sets the color of the handle of the scroll bar (hexadecimal notation).

    ex) scrollHandleColor: "#FF00FF"

setUploadableFilesFrom

  • Version 1.0.0.0 or later

  • Explanation

    Adds local resources owned by a specific component to the current component.

    DEXTUploadX5 is designed to add local resources only with a file selection dialog and a folder selection dialog.

    However, there is a situation where local resource data must be shared with each other in a situation in which items are exchanged between components.

    The setUploadableFilesFrom function is created so that the script can register a local resource item, and it is created solely for the purpose of exchanging items between the components.

    // The "dext5-uploader" component uploads the local resource items of the "dext5-a" and "dext5-b" components instead. 
    var uploader = dx5.get("dext5-uploader");
    			
    uploader.clearItems();
    // Get the files to upload from the first component. 
    uploader.setUploadableFilesFrom(dx5.get("dext5-a"));
    // Get the files to upload from the second component. 
    uploader.setUploadableFilesFrom(dx5.get("dext5-b"));
    uploader.setUploadURL("upload path");
    uploader.upload("AUTO");
    

    Components that retrieve files using the setUploadableFilesFrom method will have no UI changes.

    Prior to version 2.3.1.0, the function name was setUploableFilesFrom.

    In the 3.4.0.0 version, when uploading in sorted order, item information can be retrieved in the sorted state of the target component.

    var uploader = dx5.get("dext5-uploader");
    
    uploader.clearItems();
    
    // Set the upload order in sorted order.
    uploader.setUploadByOrder(true);
    
    // When fetching items from the target component, fetch them in sorted order.
    uploader.setUploadableFilesFrom(dx5.get("dext5-a"));
    uploader.setUploadableFilesFrom(dx5.get("dext5-b"));
    
    uploader.setUploadURL("upload path");
    uploader.upload("AUTO");
    

    Items registered using setUploableFilesFrom are not affected by setAutoSortingType, setEnableColumnSorting, and sortColumnIndex.

  • Uses

    component.setUploadableFilesFrom(otherComponent);
  • Parameters

    Name Type Explanation
    otherComponent Object DEXTUploadX5 Component object to get the file to upload

setUploadBlockSize

  • Version 1.0.0.0 or later

  • Explanation

    When performing the large file upload, sets the upload unit size.

    When performing the large file upload, DEXTUploadX5 transfers the file by dividing it by a given block size.

    When uploading a 100MB file, if the block size is 10MB, a total of 11 requests (1 header transmission + 10 file transfers) including metadata transfer occur.

    Since the setUploadBlockSize function works only for the large file upload, it is ignored for "ORAF", "OROF" and "AWSS3".

    function onDX5Created(id) {
      var dx = dx5.get(id);
      // Use the large file upload. 
      dx.setUploadMode("EXTS");
      // Set the upload block unit to 10MB. 
      dx.setUploadBlockSize(10 * 1024 * 1024);
    }
  • Uses

    component.setUploadBlockSize(blockSize);
  • Parameters

    Name Type Explanation
    blockSize Number Block size in bytes

sortColumnIndex

  • Version 1.1.0.0 or later

  • Explanation

    Sorts on a given column.

    If you make virtual files the top priority, the virtual files are always placed first, regardless of ascending or descending order.

    // Perform sorting in ascending order based on the 1st column. 
    dx.sortColumnIndex(1, false);

    If sorting by file name, the index value must be set to 1; if sorting by file size, the index value must be set to 2. If it is any other value, no sorting operation is performed.

    For TILE style, sorting is performed unconditionally based on file name, regardless of the order of the columns.

    // If tiled, sort in ascending order by file name.
    dx.sortColumnIndex(2, false);
  • Uses

    component.sortColumnIndex(index, ascending);
  • Parameters

    Name Type Explanation
    index Number When sorting, the order of the columns
    ascending Boolean ascending order if true, descending order if false

stopUploading

  • Version 1.0.0.0 or later

  • Explanation

    DEXTUploadX5 has no buttons or GUI elements to stop uploading itself.

    Instead, it provides a function that allows you to stop using a script.

    <button type="button" onclick="stop('component-id');">Stop</button>
    <script>
    function stop(id) {
      dx5.get(id).stopUploading();
    }
    </script>

    You can use the btnStopUploading property at the time of component creation to bind automatically.

    <button id="btn-stop-uploading" type="button">중지</button>
    <script>
      dx5.create({
        ...,
        // The upload stop function is automatically binded.
        btnStopUploading: "btn-stop-uploading"
      });
    </script>
  • Uses

    component.stopUploading();

upload

  • Version 1.0.0.0 or later

  • Explanation

    Starts uploading files.

    • "AUTO": Upload all local resources of status "WAIT" among all local items.
    • "SELECTED": Upload local resources with status "WAIT" among selected local items.
    • "CHECKED": Upload local resources with status "WAIT" among checked local items.

    DEXTUploadX5 has no buttons or GUI elements to upload files itself.

    Instead, it provides a function that allows you to upload using a script.

    <button type="button" onclick="upload('component-id');">Upload</button>
    <script>
    function upload(id) {
      var dx = dx5.get(id);
      if (dx.hasUploadableItems()) {
        // Start uploading.
        dx.upload("AUTO");
      } else {
        alert("There is nothing to upload.");
      }
    }
    </script>

    If you want to process uploads with the "AUTO" parameter value without special code processing, you can use the btnUploadAuto property value at the time of component creation to automatically bind.

    <button id="btn-upload" type="button">Upload</button>
    <script>
      dx5.create({
        ...,
        // The file upload function is automatically binded.
        btnUploadAuto: "btn-upload"
      });
    </script>

    In addition to the btnUploadAuto property, you can also use btnUploadSelected, btnUploadChecked.

  • Uses

    component.upload(flag);
  • Parameters

    Name Type Explanation
    flag String "AUTO", "SELECTED", "CHECKED"

useProgressDialog

  • Version 1.0.0.0 or later

  • Explanation

    Sets whether to use the self-progress window provided by the product.

    You can use the useProgressDialog function to disable the default progress window in DEXTUploadX5.

    Instead, you can use the getUploadStatus function to obtain upload progress information separately from the script.

    // Do not use the default progress window. 
    dx.useProgressDialog(false);
    // Because the progress window is not visible, use getUploadStatus function to get upload progress information.
    var status = dx.getUploadStatus();
    // Name: status.currentName 
    // Total speed: status.totalSpeed 
    // Number of uploads completed: status.completeCount
    // Total number: status.totalCount
    // Current file transfer rate: status.currentRate
    // Transferred size of current file: status.currentSendSize
    // Size of the current file: status.currentSize
    // Transfer time of the current file: status.currentTime
    // Time remaining of the current file: status.remainedCurrentTime
    // Total file transfer rate: status.totalRate
    // Size transferred: status.totalSendSize
    // Size of the entire file: status.totalSize
    // Transfer time of the entire file: status.totalTime
    // Time remaining in the entire file: status.remainedTotalTime
    
  • Uses

    component.useProgressDialog(enable);
  • Parameters

    Name Type Explanation
    enable Boolean True to use the progress window, false otherwise

moveItemDown

  • Version 1.0.0.0 or later

  • Explanation

    Moves the items in the given order down the list.

    When the target is moved using the moveItemDown function, the target's order is changed.

    // Move the sixth item to the seventh. 
    dx.moveItemDown(5);
  • Uses

    component.moveItemDown(index);
  • Parameters

    Name Type Explanation
    index Number Order of the file to move down

moveItemUp

  • Version 1.0.0.0 or later

  • Explanation

    Moves the items in the given order up the list.

    When the object is moved using the moveItemUp function, the order of the objects is changed.

    // Move the sixth item to the fifth.
    dx.moveItemUp(5);
  • Uses

    component.moveItemUp(index);
  • Parameters

    Name Type Explanation
    index Number Order of the file to move up