dhtmlx Vault

  1. How can i prevent some filetypes.

    For example I will only allow .png Files to upload ?



    2. How can I set the max Upload size. I can not change it in the php.ini.

    Is there a way to change it by the script?



    sorry for my english. Im german.
  1. How can i prevent some filetypes.

    >>For example I will only allow .png Files to upload ?


    The dialog which used for selecting files not configurable from js code, so it will be possible to select any file, but you can modify existing code to add necessary check

    dhtmlXVaultObject.prototype.addFile = function()
    {
        var currentId = this.createId();

        var file = this.currentFile;
        var fileName = this.getFileName(file.value);
        if (fileName.indexOf(".png")==-1) return;

    >>2. How can I set the max Upload size. I can not change it in the php.ini.

    >>Is there a way to change it by the script?

    The size of file can be checked only on server, it can’t be controled on client side.