Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-3278

Dropupload can limit max uploading file count

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Normal
    • Resolution: Done
    • Affects Version/s: 8.0.2
    • Fix Version/s: 8.5.2
    • Component/s: None
    • Security Level: Jimmy
    • Labels:
      None
    • gh.sprint.customfield.default.name:
      ZK 8.0.3 S7, ZK 8.0.3 S9, ZK 8.0.3 S10

      Description

      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)
              }
          });
      });   
      

        Issue Links

          Activity

          Hide
          Anonymous added a comment -

          Ready since 2018/06/13

          Show
          Anonymous added a comment - Ready since 2018/06/13

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

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

                  Agile