<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          angularQFileUploadAngularJS 大文件上傳

          聯(lián)合創(chuàng)作 · 2023-09-19 13:02

          angularQFileUpload 是一個(gè) AngularJS 擴(kuò)展,實(shí)現(xiàn)了通過七牛云儲(chǔ)存上傳大文件的服務(wù),支持恢復(fù)、進(jìn)度等功能。

          示例代碼:

          $scope.selectFiles = [];
          
          var start = function (index) {
              $scope.selectFiles[index].progress = {
                  p: 0
              };
              $scope.selectFiles[index].upload = $qupload.upload({
                  key: '<your qiniu file key>',
                  file: $scope.selectFiles[index].file,
                  token: '<your qiniu UpToken>'
              });
              $scope.selectFiles[index].upload.then(function (response) {
                  // upload success
                  $log.info(response);
              }, function (response) {
                  // upload failure
                  $log.info(response);
              }, function (evt) {
                  // progress
                  $scope.selectFiles[index].progress.p = Math.floor(100 * evt.loaded / evt.totalSize);
              });
          };
          
          $scope.abort = function (index) {
              $scope.selectFiles[index].upload.abort();
              $scope.selectFiles.splice(index, 1);
          };
          
          $scope.onFileSelect = function ($files) {
              var offsetx = $scope.selectFiles.length;
              for (var i = 0; i < $files.length; i++) {
                  $scope.selectFiles[i + offsetx] = {
                      file: $files[i]
                  };
                  start(i + offsetx);
              }
          };
          瀏覽 16
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          評(píng)論
          圖片
          表情
          推薦
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  国产无码操屄 | 翔田千里性爱视频 | 一区二区三区高清 | 二区在线999 | 精品久久久久久久久久久久久 |