Dropupload can limit max uploading file count

XMLWordPrintable

    • Type: New Feature
    • Resolution: Done
    • Priority: Normal
    • 8.5.2
    • Affects Version/s: 8.0.2
    • Component/s: None
    • Security Level: Jimmy
    • None
    • ZK 8.0.3 S7, ZK 8.0.3 S9, ZK 8.0.3 S10
    • None

      requirement spec

      Dropupload (or file upload) can provide an attribute "maxFileCount" to limit the maximal file count to upload.

      1. if the file number users try to upload (drop) exceeds the limitation, popup a warning message
      2. default value is no limitation
      3. users can customize the warning message

      psuedo code

      zk.afterLoad('zkmax.wgt', function() {
          var _origDropuploadImpl = {};
          zk.override(zkmax.wgt.Dropupload.prototype, _origDropuploadImpl, {
              _dropAction : function(event) {
          		event.stop();
                  if (event.originalEvent.dataTransfer.files.length > maxFileAllowed) {
                      jq.alert(msgzk.MESSAGE_FILE_OVER_LIMITATION, {icon:'ERROR'});
                      this.setVisible(false);
                      return;
                  }
                  _origDropuploadImpl._dropAction.apply(this, arguments)
              }
          });
      });   
      

            Assignee:
            CharlesQiu
            Reporter:
            hawk
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 4 hours
                4h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours
                4h