@gsp-svc/formdoc-upload 0.1.38 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/bundles/gsp-svc-formdoc-upload.umd.js +434 -341
  2. package/bundles/gsp-svc-formdoc-upload.umd.js.map +1 -1
  3. package/bundles/gsp-svc-formdoc-upload.umd.min.js +1 -1
  4. package/bundles/gsp-svc-formdoc-upload.umd.min.js.map +1 -1
  5. package/esm2015/lib/i18n/language.resource.js +9 -5
  6. package/esm2015/lib/upload/download.service.js +9 -1
  7. package/esm2015/lib/upload/entity/completemultiuploadrequest.js +21 -0
  8. package/esm2015/lib/upload/entity/{gspdocsecuritynaseinfo.js → gspdocsecuritybaseinfo.js} +1 -1
  9. package/esm2015/lib/upload/entity/gspformstreamentity.js +25 -0
  10. package/esm2015/lib/upload/entity/gspformuploadentity.js +1 -1
  11. package/esm2015/lib/upload/entity/initmultiuploadrequest.js +19 -0
  12. package/esm2015/lib/upload/entity/multiuploadrequest.js +21 -0
  13. package/esm2015/lib/upload/entity/multiuploadresult.js +13 -0
  14. package/esm2015/lib/upload/entity/uploadlimit.js +1 -1
  15. package/esm2015/lib/upload/file-upload/file-upload.component.js +354 -284
  16. package/esm2015/lib/upload/upload.service.js +5 -30
  17. package/esm2015/public-api.js +2 -2
  18. package/esm5/lib/i18n/language.resource.js +9 -5
  19. package/esm5/lib/upload/download.service.js +14 -1
  20. package/esm5/lib/upload/entity/completemultiuploadrequest.js +25 -0
  21. package/esm5/lib/upload/entity/{gspdocsecuritynaseinfo.js → gspdocsecuritybaseinfo.js} +1 -1
  22. package/esm5/lib/upload/entity/gspformstreamentity.js +29 -0
  23. package/esm5/lib/upload/entity/gspformuploadentity.js +1 -1
  24. package/esm5/lib/upload/entity/initmultiuploadrequest.js +23 -0
  25. package/esm5/lib/upload/entity/multiuploadrequest.js +25 -0
  26. package/esm5/lib/upload/entity/multiuploadresult.js +17 -0
  27. package/esm5/lib/upload/entity/uploadlimit.js +1 -1
  28. package/esm5/lib/upload/file-upload/file-upload.component.js +368 -296
  29. package/esm5/lib/upload/upload.service.js +5 -34
  30. package/esm5/public-api.js +2 -2
  31. package/fesm2015/gsp-svc-formdoc-upload.js +410 -329
  32. package/fesm2015/gsp-svc-formdoc-upload.js.map +1 -1
  33. package/fesm5/gsp-svc-formdoc-upload.js +447 -351
  34. package/fesm5/gsp-svc-formdoc-upload.js.map +1 -1
  35. package/gsp-svc-formdoc-upload.metadata.json +1 -1
  36. package/lib/i18n/language.resource.d.ts +4 -0
  37. package/lib/upload/download.service.d.ts +1 -0
  38. package/lib/upload/entity/completemultiuploadrequest.d.ts +9 -0
  39. package/lib/upload/entity/gspformstreamentity.d.ts +12 -0
  40. package/lib/upload/entity/initmultiuploadrequest.d.ts +7 -0
  41. package/lib/upload/entity/multiuploadrequest.d.ts +8 -0
  42. package/lib/upload/entity/multiuploadresult.d.ts +4 -0
  43. package/lib/upload/entity/uploadlimit.d.ts +1 -1
  44. package/lib/upload/file-upload/file-upload.component.d.ts +10 -6
  45. package/lib/upload/upload.service.d.ts +2 -3
  46. package/package.json +1 -1
  47. package/public-api.d.ts +1 -1
  48. /package/lib/upload/entity/{gspdocsecuritynaseinfo.d.ts → gspdocsecuritybaseinfo.d.ts} +0 -0
@@ -11,7 +11,7 @@ import { ProgressModule } from '@farris/ui-progress';
11
11
  import { FormsModule } from '@angular/forms';
12
12
  import { ComboListModule } from '@farris/ui-combo-list';
13
13
  import { CacheService, HttpService, LanguageService, SessionService } from '@ecp-caf/caf-common';
14
- import { Injectable, Pipe, Inject, LOCALE_ID, Injector, ComponentFactoryResolver, Component, ViewChild, Input, NgModule, defineInjectable } from '@angular/core';
14
+ import { Injectable, Pipe, Inject, LOCALE_ID, Component, NgModule, Injector, ComponentFactoryResolver, ViewChild, Input, defineInjectable } from '@angular/core';
15
15
  import { BsModalService } from '@farris/ui-modal';
16
16
  import { of as of$1 } from 'rxjs';
17
17
  import { HttpClientModule, HttpClient } from '@angular/common/http';
@@ -105,16 +105,6 @@ DocType[DocType.Txt] = 'Txt';
105
105
  DocType[DocType.Image] = 'Image';
106
106
  DocType[DocType.Other] = 'Other';
107
107
 
108
- /**
109
- * @fileoverview added by tsickle
110
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
111
- */
112
- var GspFormDocInfo = /** @class */ (function () {
113
- function GspFormDocInfo() {
114
- }
115
- return GspFormDocInfo;
116
- }());
117
-
118
108
  /**
119
109
  * @fileoverview added by tsickle
120
110
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -441,17 +431,11 @@ var UploadService = /** @class */ (function () {
441
431
  request.metadataId = metadataId;
442
432
  request.rootId = rootId;
443
433
  request.path = path;
444
- return this.http.post(url, request).pipe(tap((/**
434
+ return this.httpclient.post(url, request, { responseType: 'text' }).pipe(tap((/**
445
435
  * @param {?} res
446
436
  * @return {?}
447
437
  */
448
- function (res) { })), catchError((/**
449
- * @param {?} error
450
- * @return {?}
451
- */
452
- function (error) {
453
- return of(error);
454
- })));
438
+ function (res) { })));
455
439
  };
456
440
  /**
457
441
  * @param {?} uploadFileInfoList
@@ -519,36 +503,13 @@ var UploadService = /** @class */ (function () {
519
503
  * @param {?} rootId
520
504
  * @return {?}
521
505
  */
522
- UploadService.prototype.getRootSetting = /**
506
+ UploadService.prototype.getUploadInfo = /**
523
507
  * @param {?} rootId
524
508
  * @return {?}
525
509
  */
526
510
  function (rootId) {
527
511
  /** @type {?} */
528
- var url = "/api/runtime/dfs/v1.0/rootsetting/" + rootId;
529
- return this.http.get(url).pipe(tap((/**
530
- * @param {?} res
531
- * @return {?}
532
- */
533
- function (res) { })), catchError((/**
534
- * @param {?} error
535
- * @return {?}
536
- */
537
- function (error) {
538
- return of(error);
539
- })));
540
- };
541
- /**
542
- * @param {?} id
543
- * @return {?}
544
- */
545
- UploadService.prototype.getValidation = /**
546
- * @param {?} id
547
- * @return {?}
548
- */
549
- function (id) {
550
- /** @type {?} */
551
- var url = "/api/runtime/dfs/v1.0/validation/" + id;
512
+ var url = "/api/runtime/dfs/v1.0/rootsetting/info?id=" + rootId;
552
513
  return this.http.get(url).pipe(tap((/**
553
514
  * @param {?} res
554
515
  * @return {?}
@@ -582,16 +543,6 @@ var UploadFileInfo = /** @class */ (function () {
582
543
  return UploadFileInfo;
583
544
  }());
584
545
 
585
- /**
586
- * @fileoverview added by tsickle
587
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
588
- */
589
- var GspFormUploadEntity = /** @class */ (function () {
590
- function GspFormUploadEntity() {
591
- }
592
- return GspFormUploadEntity;
593
- }());
594
-
595
546
  /**
596
547
  * @fileoverview added by tsickle
597
548
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -646,7 +597,8 @@ var LANG_RESOURCES = {
646
597
  'operation': '操作',
647
598
  'size': '大小',
648
599
  'close': '关闭',
649
- 'loading': '拼命加载中'
600
+ 'loading': '拼命加载中',
601
+ 'mismatchChunkSize': '文档分片上传部分丢失,请重新上传,如果多次上传失败,请联系管理员。'
650
602
  },
651
603
  'en-US': {
652
604
  'uploadFile': 'Upload File',
@@ -674,7 +626,8 @@ var LANG_RESOURCES = {
674
626
  'operation': 'Operation',
675
627
  'size': 'Size',
676
628
  'close': 'Close',
677
- 'loading': 'Loading'
629
+ 'loading': 'Loading',
630
+ 'mismatchChunkSize': 'The partial upload of document shards is missing. Please upload again. If multiple uploads fail, please contact the administrator.'
678
631
  },
679
632
  'en': {
680
633
  'uploadFile': 'Upload File',
@@ -702,7 +655,8 @@ var LANG_RESOURCES = {
702
655
  'operation': 'Operation',
703
656
  'size': 'Size',
704
657
  'close': 'Close',
705
- 'loading': 'Loading'
658
+ 'loading': 'Loading',
659
+ 'mismatchChunkSize': 'The partial upload of document shards is missing. Please upload again. If multiple uploads fail, please contact the administrator.'
706
660
  },
707
661
  'zh-CHT': {
708
662
  'uploadFile': '上傳文件',
@@ -730,7 +684,8 @@ var LANG_RESOURCES = {
730
684
  'operation': '操作',
731
685
  'size': '大小',
732
686
  'close': '關閉',
733
- 'loading': '拼命加載中'
687
+ 'loading': '拼命加載中',
688
+ 'mismatchChunkSize': '文檔分片上傳部分遺失,請重新上傳,如果多次上傳失敗,請聯系管理員。'
734
689
  },
735
690
  };
736
691
 
@@ -775,6 +730,46 @@ var GspDocSecurityBaseInfo = /** @class */ (function () {
775
730
  return GspDocSecurityBaseInfo;
776
731
  }());
777
732
 
733
+ /**
734
+ * @fileoverview added by tsickle
735
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
736
+ */
737
+ var InitMultiUploadRequest = /** @class */ (function () {
738
+ function InitMultiUploadRequest() {
739
+ }
740
+ return InitMultiUploadRequest;
741
+ }());
742
+
743
+ /**
744
+ * @fileoverview added by tsickle
745
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
746
+ */
747
+ var CompleteMultiUploadRequest = /** @class */ (function () {
748
+ function CompleteMultiUploadRequest() {
749
+ }
750
+ return CompleteMultiUploadRequest;
751
+ }());
752
+
753
+ /**
754
+ * @fileoverview added by tsickle
755
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
756
+ */
757
+ var GspFormStreamEntity = /** @class */ (function () {
758
+ function GspFormStreamEntity() {
759
+ }
760
+ return GspFormStreamEntity;
761
+ }());
762
+
763
+ /**
764
+ * @fileoverview added by tsickle
765
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
766
+ */
767
+ var MultiUploadRequest = /** @class */ (function () {
768
+ function MultiUploadRequest() {
769
+ }
770
+ return MultiUploadRequest;
771
+ }());
772
+
778
773
  /**
779
774
  * @fileoverview added by tsickle
780
775
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -794,7 +789,7 @@ var FileUploadComponent = /** @class */ (function () {
794
789
  this.beyondFileList = [];
795
790
  this.showType = 0;
796
791
  this.mouseOn = false;
797
- this.bufferSize = 10 * 1024 * 1024;
792
+ this.bufferSize = 5 * 1024 * 1024;
798
793
  this.selectedFileCount = 0;
799
794
  this.uploadIconAddress = '/platform/runtime/dfs/images/upload.svg';
800
795
  this.uploadLittleIconAddress = '/platform/runtime/dfs/images/uploadIcon.svg';
@@ -802,8 +797,6 @@ var FileUploadComponent = /** @class */ (function () {
802
797
  this.fileAllSelected = false;
803
798
  this.uploadProcess = { width: '0%' };
804
799
  this.fileTotalChunk = {};
805
- //fileUploadState: { [key: string]: boolean } = {};
806
- //flag: number = 0;
807
800
  this.requestArray = new Array;
808
801
  this.requestBodyArray = new Array;
809
802
  this.uploadedChunk = {};
@@ -887,14 +880,15 @@ var FileUploadComponent = /** @class */ (function () {
887
880
  _this.haveExtensionProperty = true;
888
881
  }
889
882
  }));
890
- this.uploadService.getRootSetting(this.rootId).subscribe((/**
883
+ this.uploadService.getUploadInfo(this.rootId).subscribe((/**
891
884
  * @param {?} res
892
885
  * @return {?}
893
886
  */
894
887
  function (res) {
895
888
  if (res != null && res.error == null) {
896
889
  _this.sameNameAllowed = res.sameNameAllowed;
897
- _this.validationId = res.validationId;
890
+ _this.maxFileSize = parseInt(JSON.parse(res.validateConfiguration).maxFileSize);
891
+ _this.allowedMultiUpload = res.allowedMultiUpload;
898
892
  if (!_this.sameNameAllowed) {
899
893
  _this.uploadService.getUploadedFileInfoList(_this.formId, _this.rootId).subscribe((/**
900
894
  * @param {?} res
@@ -907,18 +901,9 @@ var FileUploadComponent = /** @class */ (function () {
907
901
  }
908
902
  }));
909
903
  }
910
- _this.uploadService.getValidation(_this.validationId).subscribe((/**
911
- * @param {?} res
912
- * @return {?}
913
- */
914
- function (res) {
915
- _this.maxFileSize = parseInt(JSON.parse(res.configuration).maxFileSize);
916
- }));
917
904
  }
918
905
  }));
919
- if (this.oldIdList != null && this.oldIdList.length > 0) {
920
- this.uploadService.cancel(this.oldIdList, this.rootId).subscribe();
921
- }
906
+ if (this.oldIdList != null && this.oldIdList.length > 0) ;
922
907
  };
923
908
  /**
924
909
  * @return {?}
@@ -942,12 +927,7 @@ var FileUploadComponent = /** @class */ (function () {
942
927
  * @return {?}
943
928
  */
944
929
  function ($event) {
945
- // const loading = this.loadService.show({
946
- // message: this.localepipe.transform('uploading')
947
- // });
948
930
  var _this = this;
949
- // this.totalLoad.close();
950
- // this.totalLoad = null;
951
931
  this.hasSelectedFile = true;
952
932
  this.selectedFiles = document.querySelector('#file');
953
933
  if (this.fileCount > 0) {
@@ -980,11 +960,6 @@ var FileUploadComponent = /** @class */ (function () {
980
960
  * @return {?}
981
961
  */
982
962
  function (x) { return x.fileName == selectedFile.name; })) != null) {
983
- // this.uploadedNameList.push(selectedFile.name);
984
- // this.msgService.question('之前已上传过同名文件: ' + selectedFile.name + ',需要替换么?', () => {
985
- // uuid = this.uploadedFileInfoList.find(x => x.fileName == selectedFile.name).metadataId;
986
- // this.uploadFile(uuid, selectedFile);
987
- // })
988
963
  /** @type {?} */
989
964
  var msg_1 = this_1.msgService.show('warning', this_1.localepipe.transform('haveSameName') + selectedFile.name, {
990
965
  initialState: {
@@ -1072,11 +1047,6 @@ var FileUploadComponent = /** @class */ (function () {
1072
1047
  for (var i = 0; i < this.selectedFiles.files.length; i++) {
1073
1048
  _loop_1(i);
1074
1049
  }
1075
- // if (this.uploadedNameList.length > 0) {
1076
- // let name: string = this.listToString(this.uploadedNameList);
1077
- // this.msgService.warning('之前已上传过同名文件: ' + name + '请重新选择上传文件。');
1078
- // this.uploadedNameList = [];
1079
- // }
1080
1050
  if (this.errFileList.length > 0) {
1081
1051
  /** @type {?} */
1082
1052
  var name_1 = this.listToString(this.errFileList);
@@ -1097,11 +1067,6 @@ var FileUploadComponent = /** @class */ (function () {
1097
1067
  this.msgService.warning(name_3 + this.localepipe.transform('sizeMax') + this.maxFileSize + "KB" + this.localepipe.transform('rechooseFile'));
1098
1068
  this.beyondFileList = [];
1099
1069
  }
1100
- // if (this.errTypeList.length > 0) {
1101
- // let type: string = this.listToString(this.errTypeList);
1102
- // this.msgService.warning('不支持上传类型为 ' + type + '的文件请重新选择上传文件。');
1103
- // this.errTypeList = [];
1104
- // }
1105
1070
  this.files = this.files.slice();
1106
1071
  this.fileAllSelected = false;
1107
1072
  $event.target.value = '';
@@ -1131,69 +1096,62 @@ var FileUploadComponent = /** @class */ (function () {
1131
1096
  * @return {?}
1132
1097
  */
1133
1098
  function (uuid, selectedFile, fileName) {
1134
- var _this = this;
1135
- return new Promise((/**
1136
- * @param {?} resolve
1137
- * @return {?}
1138
- */
1139
- function (resolve) {
1140
- /** @type {?} */
1141
- var fileInfo;
1142
- fileInfo = {
1143
- id: uuid,
1144
- name: fileName,
1145
- type: selectedFile.type,
1146
- source: "",
1147
- size: _this.getFileSize(selectedFile.size),
1148
- fileSize: selectedFile.size,
1149
- picListDisplayName: _this.getPicListDisplayName(fileName),
1150
- queueListDisplayName: _this.getQueueDisplayName(fileName),
1151
- //content: reader.result.toString(),
1152
- hasUploaded: false,
1153
- mouseOn: false,
1154
- selectd: false,
1155
- isUploading: true,
1156
- uploadResult: false,
1157
- uploadProcess: 0,
1158
- errorMessage: "",
1159
- extensionDropListId: 0,
1160
- extensionName: "",
1161
- securityDropListId: 0,
1162
- securityInfo: _this.securityInfoList[0]
1163
- };
1164
- if (_this.storageExtension != null)
1165
- fileInfo.extensionName = _this.defaultPropertyName;
1166
- /** @type {?} */
1167
- var type = selectedFile.type;
1168
- if (type.includes("tiff")) {
1169
- _this.addDocInfo(selectedFile, fileInfo, DocType.Other);
1170
- }
1171
- else if (type.includes("image")) {
1172
- _this.addDocInfo(selectedFile, fileInfo, DocType.Image);
1173
- }
1174
- else if (type.includes("word")) {
1175
- _this.addDocInfo(selectedFile, fileInfo, DocType.Word);
1176
- }
1177
- else if (type.includes("pdf")) {
1178
- _this.addDocInfo(selectedFile, fileInfo, DocType.Pdf);
1179
- }
1180
- else if (type.includes("plain")) {
1181
- _this.addDocInfo(selectedFile, fileInfo, DocType.Txt);
1182
- }
1183
- else if (type.includes("sheet") || type.includes("excel")) {
1184
- _this.addDocInfo(selectedFile, fileInfo, DocType.Excel);
1185
- }
1186
- else if (type.includes("powerpoint") || type.includes("presentation")) {
1187
- _this.addDocInfo(selectedFile, fileInfo, DocType.Powerpoint);
1188
- }
1189
- else {
1190
- _this.addDocInfo(selectedFile, fileInfo, DocType.Other);
1191
- // let name: string = selectedFile.name;
1192
- // let errType = name.substring(selectedFile.name.lastIndexOf('.'));
1193
- // this.errTypeList.push(errType);
1194
- }
1195
- resolve(fileInfo);
1196
- }));
1099
+ /** @type {?} */
1100
+ var fileInfo;
1101
+ fileInfo = {
1102
+ id: uuid,
1103
+ name: fileName,
1104
+ type: selectedFile.type,
1105
+ source: "",
1106
+ size: this.getFileSize(selectedFile.size),
1107
+ fileSize: selectedFile.size,
1108
+ picListDisplayName: this.getPicListDisplayName(fileName),
1109
+ queueListDisplayName: this.getQueueDisplayName(fileName),
1110
+ //content: reader.result.toString(),
1111
+ hasUploaded: false,
1112
+ mouseOn: false,
1113
+ selectd: false,
1114
+ isUploading: true,
1115
+ uploadResult: false,
1116
+ uploadProcess: 0,
1117
+ errorMessage: "",
1118
+ extensionDropListId: 0,
1119
+ extensionName: "",
1120
+ securityDropListId: 0,
1121
+ securityInfo: this.securityInfoList[0]
1122
+ };
1123
+ if (this.storageExtension != null)
1124
+ fileInfo.extensionName = this.defaultPropertyName;
1125
+ /** @type {?} */
1126
+ var type = selectedFile.type;
1127
+ if (type.includes("tiff")) {
1128
+ this.addDocInfo(selectedFile, fileInfo, DocType.Other);
1129
+ }
1130
+ else if (type.includes("image")) {
1131
+ this.addDocInfo(selectedFile, fileInfo, DocType.Image);
1132
+ }
1133
+ else if (type.includes("word")) {
1134
+ this.addDocInfo(selectedFile, fileInfo, DocType.Word);
1135
+ }
1136
+ else if (type.includes("pdf")) {
1137
+ this.addDocInfo(selectedFile, fileInfo, DocType.Pdf);
1138
+ }
1139
+ else if (type.includes("plain")) {
1140
+ this.addDocInfo(selectedFile, fileInfo, DocType.Txt);
1141
+ }
1142
+ else if (type.includes("sheet") || type.includes("excel")) {
1143
+ this.addDocInfo(selectedFile, fileInfo, DocType.Excel);
1144
+ }
1145
+ else if (type.includes("powerpoint") || type.includes("presentation")) {
1146
+ this.addDocInfo(selectedFile, fileInfo, DocType.Powerpoint);
1147
+ }
1148
+ else {
1149
+ this.addDocInfo(selectedFile, fileInfo, DocType.Other);
1150
+ // let name: string = selectedFile.name;
1151
+ // let errType = name.substring(selectedFile.name.lastIndexOf('.'));
1152
+ // this.errTypeList.push(errType);
1153
+ }
1154
+ return fileInfo;
1197
1155
  };
1198
1156
  /**
1199
1157
  * @param {?} uuid
@@ -1212,126 +1170,190 @@ var FileUploadComponent = /** @class */ (function () {
1212
1170
  function (uuid, selectedFile, fileName, state) {
1213
1171
  var _this = this;
1214
1172
  if (state === void 0) { state = FileState.New; }
1215
- this.handleFileInfo(uuid, selectedFile, fileName).then((/**
1216
- * @param {?} res
1217
- * @return {?}
1218
- */
1219
- function (res) {
1220
- /** @type {?} */
1221
- var fileInfo = res;
1222
- /** @type {?} */
1223
- var chunkTotal = Math.ceil(selectedFile.size / _this.bufferSize);
1173
+ /** @type {?} */
1174
+ var fileInfo = this.handleFileInfo(uuid, selectedFile, fileName);
1175
+ /** @type {?} */
1176
+ var uploadFileInfo = new UploadFileInfo();
1177
+ uploadFileInfo.metadataId = uuid;
1178
+ uploadFileInfo.fileName = fileInfo.name;
1179
+ uploadFileInfo.fileSize = fileInfo.fileSize;
1180
+ uploadFileInfo.state = state;
1181
+ uploadFileInfo.securityInfo = this.securityInfoList[0];
1182
+ //判断是否支持分片上传
1183
+ if (this.allowedMultiUpload) {
1184
+ //支持分片上传
1224
1185
  /** @type {?} */
1225
- var chunkIndex = 0;
1226
- _this.fileTotalChunk[uuid] = chunkTotal;
1186
+ var initRequest = new InitMultiUploadRequest;
1187
+ initRequest.path = this.formId;
1188
+ initRequest.metadataId = uuid;
1189
+ initRequest.rootId = this.rootId;
1190
+ initRequest.size = fileInfo.fileSize;
1191
+ initRequest.fileName = fileName;
1192
+ //初始化分片
1193
+ this.initMultiUpload(initRequest).subscribe((/**
1194
+ * @param {?} res
1195
+ * @return {?}
1196
+ */
1197
+ function (res) {
1198
+ if (res.error != null) {
1199
+ _this.files[_this.files.indexOf(fileInfo)].uploadResult = false;
1200
+ _this.files[_this.files.indexOf(fileInfo)].isUploading = false;
1201
+ _this.files[_this.files.indexOf(fileInfo)].errorMessage = res.error.Message;
1202
+ }
1203
+ else {
1204
+ /** @type {?} */
1205
+ var uploadId_1 = res.uploadId;
1206
+ /** @type {?} */
1207
+ var chunkTotal = Math.ceil(selectedFile.size / _this.bufferSize);
1208
+ /** @type {?} */
1209
+ var chunkIndex = 0;
1210
+ /** @type {?} */
1211
+ var multiResultList_1 = [];
1212
+ _this.fileTotalChunk[uuid] = chunkTotal;
1213
+ _this.uploadedChunk[uuid] = 0;
1214
+ while (chunkIndex < chunkTotal) {
1215
+ /** @type {?} */
1216
+ var nextSize = Math.min((chunkIndex + 1) * _this.bufferSize, selectedFile.size);
1217
+ /** @type {?} */
1218
+ var fileData = selectedFile.slice(chunkIndex * _this.bufferSize, nextSize);
1219
+ /** @type {?} */
1220
+ var multiRequest = new MultiUploadRequest;
1221
+ multiRequest.metadataId = uuid;
1222
+ multiRequest.rootId = _this.rootId;
1223
+ multiRequest.uploadId = uploadId_1;
1224
+ multiRequest.index = chunkIndex;
1225
+ multiRequest.total = chunkTotal;
1226
+ multiRequest.size = fileData.size;
1227
+ /** @type {?} */
1228
+ var formData = new FormData();
1229
+ formData.append('multiRequest', JSON.stringify(multiRequest));
1230
+ formData.append('file', fileData);
1231
+ _this.multiUpload(formData).subscribe((/**
1232
+ * @param {?} res
1233
+ * @return {?}
1234
+ */
1235
+ function (res) {
1236
+ if (res.error != null) {
1237
+ _this.files[_this.files.indexOf(fileInfo)].uploadResult = false;
1238
+ _this.files[_this.files.indexOf(fileInfo)].isUploading = false;
1239
+ _this.files[_this.files.indexOf(fileInfo)].errorMessage = res.error.Message;
1240
+ }
1241
+ else {
1242
+ multiResultList_1.push(res.result);
1243
+ _this.uploadedChunk[uuid]++;
1244
+ _this.files[_this.files.indexOf(fileInfo)].uploadProcess = Number.parseInt((_this.uploadedChunk[uuid] / _this.fileTotalChunk[uuid] * 100).toFixed(0));
1245
+ if (_this.uploadedChunk[uuid] == _this.fileTotalChunk[uuid]) {
1246
+ if (multiResultList_1.length == _this.fileTotalChunk[uuid]) {
1247
+ _this.files[_this.files.indexOf(fileInfo)].uploadResult = true;
1248
+ _this.files[_this.files.indexOf(fileInfo)].isUploading = false;
1249
+ _this.uploadFileInfoList = _this.uploadFileInfoList.concat(uploadFileInfo);
1250
+ _this.uploadedFileInfoList = _this.uploadedFileInfoList.concat(uploadFileInfo);
1251
+ _this.uploadedFileTotal++;
1252
+ /** @type {?} */
1253
+ var completeMultiUploadRequest = new CompleteMultiUploadRequest;
1254
+ completeMultiUploadRequest.metadataId = uuid;
1255
+ completeMultiUploadRequest.partList = multiResultList_1;
1256
+ completeMultiUploadRequest.rootId = _this.rootId;
1257
+ completeMultiUploadRequest.uploadId = uploadId_1;
1258
+ completeMultiUploadRequest.size = fileInfo.fileSize;
1259
+ if (_this.haveExtensionProperty)
1260
+ completeMultiUploadRequest.exPropertyName = _this.defaultPropertyName;
1261
+ _this.completeMultiUpload(completeMultiUploadRequest).subscribe((/**
1262
+ * @param {?} res
1263
+ * @return {?}
1264
+ */
1265
+ function (res) {
1266
+ }));
1267
+ //后台异步拼接文档
1268
+ }
1269
+ else {
1270
+ _this.files[_this.files.indexOf(fileInfo)].uploadResult = false;
1271
+ _this.files[_this.files.indexOf(fileInfo)].isUploading = false;
1272
+ _this.files[_this.files.indexOf(fileInfo)].errorMessage = _this.localepipe.transform('mismatchChunkSize');
1273
+ }
1274
+ }
1275
+ }
1276
+ }));
1277
+ chunkIndex = chunkIndex + 1;
1278
+ }
1279
+ }
1280
+ }));
1281
+ }
1282
+ else {
1227
1283
  /** @type {?} */
1228
- var uploadFileInfo = new UploadFileInfo();
1229
- uploadFileInfo.metadataId = uuid;
1230
- uploadFileInfo.fileName = fileInfo.name;
1231
- uploadFileInfo.fileSize = fileInfo.size;
1232
- uploadFileInfo.state = state;
1233
- uploadFileInfo.securityInfo = _this.securityInfoList[0];
1234
- while (chunkIndex < chunkTotal) {
1235
- /** @type {?} */
1236
- var uploadInfo = new GspFormUploadEntity;
1237
- uploadInfo.formId = _this.formId;
1238
- uploadInfo.mode = OperatingModes.Temp;
1239
- uploadInfo.rootId = _this.rootId;
1240
- /** @type {?} */
1241
- var docInfo = new GspFormDocInfo;
1242
- docInfo.fileName = fileName;
1243
- docInfo.metadataId = uuid;
1244
- docInfo.total = chunkTotal;
1245
- _this.uploadedChunk[docInfo.metadataId] = 0;
1246
- /** @type {?} */
1247
- var nextSize = Math.min((chunkIndex + 1) * _this.bufferSize, selectedFile.size);
1248
- /** @type {?} */
1249
- var fileData = selectedFile.slice(chunkIndex * _this.bufferSize, nextSize);
1250
- // let reader = new FileReader();
1251
- // reader.readAsBinaryString(fileData);
1252
- /** @type {?} */
1253
- var innerIndex = chunkIndex;
1254
- // reader.onload = () => {
1255
- // docInfo.fileContent = btoa(reader.result.toString());
1256
- docInfo.size = selectedFile.size;
1257
- docInfo.index = innerIndex;
1258
- docInfo.fileContent = "";
1259
- //chunkIndex++;
1260
- if (_this.haveExtensionProperty)
1261
- docInfo.exPropertyName = _this.defaultPropertyName;
1262
- //docInfo.isLast = true;
1263
- uploadInfo.docInfo = docInfo;
1264
- // let info = uploadInfo;
1265
- // this.requestArray.push(this.uploadService.uploadFile(uploadInfo));
1266
- // this.requestBodyArray.push(info);
1267
- //封装请求formdata
1268
- /** @type {?} */
1269
- var formData = new FormData();
1270
- formData.append('uploadInfo', JSON.stringify(uploadInfo));
1271
- formData.append('docInfo', JSON.stringify(docInfo));
1272
- formData.append('file', fileData);
1273
- // }
1274
- //console.log(chunkIndex + 1);
1275
- chunkIndex = chunkIndex + 1;
1276
- }
1284
+ var entity = new GspFormStreamEntity;
1285
+ entity.formId = this.formId;
1286
+ entity.metadataId = uuid;
1287
+ entity.mode = OperatingModes.Temp;
1288
+ entity.rootId = this.rootId;
1289
+ entity.size = selectedFile.size;
1290
+ entity.fileName = fileName;
1291
+ if (this.haveExtensionProperty)
1292
+ entity.exPropertyName = this.defaultPropertyName;
1277
1293
  /** @type {?} */
1278
- var index = -1;
1279
- _this.files.forEach((/**
1280
- * @param {?} x
1294
+ var formData = new FormData();
1295
+ formData.append('uploadEntity', JSON.stringify(entity));
1296
+ formData.append('file', selectedFile);
1297
+ this.uploadSingleFile(formData).subscribe((/**
1298
+ * @param {?} res
1281
1299
  * @return {?}
1282
1300
  */
1283
- function (x) {
1284
- if (x.name == fileInfo.name) {
1285
- if (index == -1)
1286
- index = _this.files.indexOf(x);
1301
+ function (res) {
1302
+ if (res != null) {
1303
+ _this.files[_this.files.indexOf(fileInfo)].uploadResult = false;
1304
+ _this.files[_this.files.indexOf(fileInfo)].isUploading = false;
1305
+ _this.files[_this.files.indexOf(fileInfo)].errorMessage = res.error.Message;
1306
+ }
1307
+ else {
1308
+ _this.files[_this.files.indexOf(fileInfo)].uploadResult = true;
1309
+ _this.files[_this.files.indexOf(fileInfo)].isUploading = false;
1310
+ _this.uploadFileInfoList = _this.uploadFileInfoList.concat(uploadFileInfo);
1311
+ _this.uploadedFileInfoList = _this.uploadedFileInfoList.concat(uploadFileInfo);
1312
+ _this.uploadedFileTotal++;
1287
1313
  }
1288
1314
  }));
1289
- if (index != -1 && index != _this.files.length - 1) {
1290
- _this.files.splice(index, 1);
1291
- _this.uploadFileInfoList.splice(index, 1);
1292
- _this.uploadedFileInfoList.splice(index, 1);
1293
- _this.uploadedFileTotal--;
1315
+ }
1316
+ /** @type {?} */
1317
+ var index = -1;
1318
+ this.files.forEach((/**
1319
+ * @param {?} x
1320
+ * @return {?}
1321
+ */
1322
+ function (x) {
1323
+ if (x.name == fileInfo.name) {
1324
+ if (index == -1)
1325
+ index = _this.files.indexOf(x);
1294
1326
  }
1295
1327
  }));
1328
+ if (index != -1 && index != this.files.length - 1) {
1329
+ this.files.splice(index, 1);
1330
+ this.uploadFileInfoList.splice(index, 1);
1331
+ this.uploadedFileInfoList.splice(index, 1);
1332
+ //this.uploadedFileTotal--;
1333
+ }
1296
1334
  };
1297
1335
  /**
1298
- * @param {?} formData
1299
- * @param {?} fileInfo
1300
- * @param {?} docInfo
1301
- * @param {?} uploadFileInfo
1336
+ * @param {?} formdata
1302
1337
  * @return {?}
1303
1338
  */
1304
- FileUploadComponent.prototype.sendUploadRequest = /**
1305
- * @param {?} formData
1306
- * @param {?} fileInfo
1307
- * @param {?} docInfo
1308
- * @param {?} uploadFileInfo
1339
+ FileUploadComponent.prototype.uploadSingleFile = /**
1340
+ * @param {?} formdata
1309
1341
  * @return {?}
1310
1342
  */
1311
- function (formData, fileInfo, docInfo, uploadFileInfo) {
1312
- var _this = this;
1313
- this.uploadSliceFile(formData).subscribe((/**
1343
+ function (formdata) {
1344
+ /** @type {?} */
1345
+ var url = "/api/runtime/dfs/v1.0/formdoc/single";
1346
+ return this.httpclient.post(url, formdata).pipe(tap((/**
1314
1347
  * @param {?} res
1315
1348
  * @return {?}
1316
1349
  */
1317
- function (res) {
1318
- if (res != null) {
1319
- _this.files[_this.files.indexOf(fileInfo)].uploadResult = false;
1320
- _this.files[_this.files.indexOf(fileInfo)].isUploading = false;
1321
- _this.files[_this.files.indexOf(fileInfo)].errorMessage = res.error.Message;
1322
- }
1323
- else {
1324
- _this.uploadedChunk[docInfo.metadataId]++;
1325
- _this.files[_this.files.indexOf(fileInfo)].uploadProcess = Number.parseInt((_this.uploadedChunk[docInfo.metadataId] / _this.fileTotalChunk[docInfo.metadataId] * 100).toFixed(0));
1326
- if (_this.uploadedChunk[docInfo.metadataId] == _this.fileTotalChunk[docInfo.metadataId]) {
1327
- _this.files[_this.files.indexOf(fileInfo)].uploadResult = true;
1328
- _this.files[_this.files.indexOf(fileInfo)].isUploading = false;
1329
- _this.uploadFileInfoList = _this.uploadFileInfoList.concat(uploadFileInfo);
1330
- _this.uploadedFileInfoList = _this.uploadedFileInfoList.concat(uploadFileInfo);
1331
- _this.uploadedFileTotal++;
1332
- }
1333
- }
1334
- }));
1350
+ function (res) { })), catchError((/**
1351
+ * @param {?} error
1352
+ * @return {?}
1353
+ */
1354
+ function (error) {
1355
+ return of$1(error);
1356
+ })));
1335
1357
  };
1336
1358
  /**
1337
1359
  * @param {?} formdata
@@ -1344,7 +1366,6 @@ var FileUploadComponent = /** @class */ (function () {
1344
1366
  function (formdata) {
1345
1367
  /** @type {?} */
1346
1368
  var url = "/api/runtime/dfs/v1.0/formdoc/slice";
1347
- //url = "/api/runtime/dfs/v1.0/formdoc/list";
1348
1369
  return this.httpclient.post(url, formdata).pipe(tap((/**
1349
1370
  * @param {?} res
1350
1371
  * @return {?}
@@ -1357,6 +1378,75 @@ var FileUploadComponent = /** @class */ (function () {
1357
1378
  return of$1(error);
1358
1379
  })));
1359
1380
  };
1381
+ /**
1382
+ * @param {?} request
1383
+ * @return {?}
1384
+ */
1385
+ FileUploadComponent.prototype.initMultiUpload = /**
1386
+ * @param {?} request
1387
+ * @return {?}
1388
+ */
1389
+ function (request) {
1390
+ /** @type {?} */
1391
+ var url = "/api/runtime/dfs/v1.0/formdoc/multi/init";
1392
+ return this.httpclient.post(url, request).pipe(tap((/**
1393
+ * @param {?} res
1394
+ * @return {?}
1395
+ */
1396
+ function (res) { })), catchError((/**
1397
+ * @param {?} error
1398
+ * @return {?}
1399
+ */
1400
+ function (error) {
1401
+ return of$1(error);
1402
+ })));
1403
+ };
1404
+ /**
1405
+ * @param {?} formdata
1406
+ * @return {?}
1407
+ */
1408
+ FileUploadComponent.prototype.multiUpload = /**
1409
+ * @param {?} formdata
1410
+ * @return {?}
1411
+ */
1412
+ function (formdata) {
1413
+ /** @type {?} */
1414
+ var url = "/api/runtime/dfs/v1.0/formdoc/multi/upload";
1415
+ return this.httpclient.post(url, formdata).pipe(tap((/**
1416
+ * @param {?} res
1417
+ * @return {?}
1418
+ */
1419
+ function (res) { })), catchError((/**
1420
+ * @param {?} error
1421
+ * @return {?}
1422
+ */
1423
+ function (error) {
1424
+ return of$1(error);
1425
+ })));
1426
+ };
1427
+ /**
1428
+ * @param {?} request
1429
+ * @return {?}
1430
+ */
1431
+ FileUploadComponent.prototype.completeMultiUpload = /**
1432
+ * @param {?} request
1433
+ * @return {?}
1434
+ */
1435
+ function (request) {
1436
+ /** @type {?} */
1437
+ var url = "/api/runtime/dfs/v1.0/formdoc/multi/complete";
1438
+ return this.httpclient.post(url, request).pipe(tap((/**
1439
+ * @param {?} res
1440
+ * @return {?}
1441
+ */
1442
+ function (res) { })), catchError((/**
1443
+ * @param {?} error
1444
+ * @return {?}
1445
+ */
1446
+ function (error) {
1447
+ return of$1(error);
1448
+ })));
1449
+ };
1360
1450
  /**
1361
1451
  * @return {?}
1362
1452
  */
@@ -1370,8 +1460,6 @@ var FileUploadComponent = /** @class */ (function () {
1370
1460
  * @return {?}
1371
1461
  */
1372
1462
  function (element) {
1373
- // let obj: any = document.getElementById(element.name);
1374
- // obj.checked = true;
1375
1463
  element.selectd = true;
1376
1464
  }));
1377
1465
  this.fileAllSelected = true;
@@ -1383,8 +1471,6 @@ var FileUploadComponent = /** @class */ (function () {
1383
1471
  * @return {?}
1384
1472
  */
1385
1473
  function (element) {
1386
- // let obj: any = document.getElementById(element.name);
1387
- // obj.checked = false;
1388
1474
  element.selectd = false;
1389
1475
  }));
1390
1476
  this.fileAllSelected = false;
@@ -1478,9 +1564,6 @@ var FileUploadComponent = /** @class */ (function () {
1478
1564
  metadataList.push(element.id);
1479
1565
  _this.files.splice(_this.files.indexOf(element), 1);
1480
1566
  if (element.uploadResult) {
1481
- // let idList: string[] = [];
1482
- // idList.push(fileInfo.id);
1483
- // this.uploadService.cancel(idList, this.rootId).subscribe();
1484
1567
  _this.uploadFileInfoList.splice(_this.uploadFileInfoList.indexOf(_this.uploadFileInfoList.filter((/**
1485
1568
  * @param {?} x
1486
1569
  * @return {?}
@@ -1546,90 +1629,76 @@ var FileUploadComponent = /** @class */ (function () {
1546
1629
  */
1547
1630
  function (selectdFile, fileInfo, docType) {
1548
1631
  var _this = this;
1549
- return new Promise((/**
1550
- * @param {?} resolve
1551
- * @return {?}
1552
- */
1553
- function (resolve) {
1554
- switch (docType) {
1555
- case DocType.Word: {
1556
- fileInfo.source = "/platform/runtime/dfs/images/word.png";
1557
- _this.files.push(fileInfo);
1558
- break;
1559
- }
1560
- case DocType.Pdf: {
1561
- fileInfo.source = "/platform/runtime/dfs/images/pdf.png";
1562
- _this.files.push(fileInfo);
1563
- break;
1564
- }
1565
- case DocType.Excel: {
1566
- fileInfo.source = "/platform/runtime/dfs/images/excel.png";
1567
- _this.files.push(fileInfo);
1568
- break;
1569
- }
1570
- case DocType.Txt: {
1571
- fileInfo.source = "/platform/runtime/dfs/images/txt.png";
1572
- _this.files.push(fileInfo);
1573
- break;
1574
- }
1575
- case DocType.Powerpoint: {
1576
- fileInfo.source = "/platform/runtime/dfs/images/ppt.png";
1577
- _this.files.push(fileInfo);
1578
- break;
1579
- }
1580
- case DocType.Other: {
1581
- fileInfo.source = "/platform/runtime/dfs/images/file.png";
1632
+ switch (docType) {
1633
+ case DocType.Word: {
1634
+ fileInfo.source = "/platform/runtime/dfs/images/word.png";
1635
+ this.files.push(fileInfo);
1636
+ break;
1637
+ }
1638
+ case DocType.Pdf: {
1639
+ fileInfo.source = "/platform/runtime/dfs/images/pdf.png";
1640
+ this.files.push(fileInfo);
1641
+ break;
1642
+ }
1643
+ case DocType.Excel: {
1644
+ fileInfo.source = "/platform/runtime/dfs/images/excel.png";
1645
+ this.files.push(fileInfo);
1646
+ break;
1647
+ }
1648
+ case DocType.Txt: {
1649
+ fileInfo.source = "/platform/runtime/dfs/images/txt.png";
1650
+ this.files.push(fileInfo);
1651
+ break;
1652
+ }
1653
+ case DocType.Powerpoint: {
1654
+ fileInfo.source = "/platform/runtime/dfs/images/ppt.png";
1655
+ this.files.push(fileInfo);
1656
+ break;
1657
+ }
1658
+ case DocType.Other: {
1659
+ fileInfo.source = "/platform/runtime/dfs/images/file.png";
1660
+ this.files.push(fileInfo);
1661
+ break;
1662
+ }
1663
+ case DocType.Image: {
1664
+ /** @type {?} */
1665
+ var reader_1 = new FileReader();
1666
+ reader_1.readAsDataURL(selectdFile);
1667
+ reader_1.onload = (/**
1668
+ * @param {?} _event
1669
+ * @return {?}
1670
+ */
1671
+ function (_event) {
1672
+ /** @type {?} */
1673
+ var imgUrl = reader_1.result;
1674
+ if (_this.injector != null) {
1675
+ /** @type {?} */
1676
+ var sanitizer = _this.injector.get(DomSanitizer);
1677
+ imgUrl = sanitizer.bypassSecurityTrustResourceUrl(imgUrl);
1678
+ }
1679
+ fileInfo.source = imgUrl;
1582
1680
  _this.files.push(fileInfo);
1583
- break;
1584
- }
1585
- case DocType.Image: {
1586
- _this.getImageUrl(selectdFile).then((/**
1587
- * @param {?} res
1681
+ //因为异步处理的差异,补偿一次删除
1682
+ /** @type {?} */
1683
+ var index = -1;
1684
+ _this.files.forEach((/**
1685
+ * @param {?} x
1588
1686
  * @return {?}
1589
1687
  */
1590
- function (res) {
1591
- fileInfo.source = res;
1592
- _this.files.push(fileInfo);
1593
- resolve(fileInfo);
1688
+ function (x) {
1689
+ if (x.name == fileInfo.name) {
1690
+ if (index == -1)
1691
+ index = _this.files.indexOf(x);
1692
+ }
1594
1693
  }));
1595
- }
1694
+ if (index != -1 && index != _this.files.length - 1) {
1695
+ _this.files.splice(index, 1);
1696
+ _this.uploadFileInfoList.splice(index, 1);
1697
+ _this.uploadedFileInfoList.splice(index, 1);
1698
+ }
1699
+ });
1596
1700
  }
1597
- resolve(fileInfo);
1598
- }));
1599
- };
1600
- /**
1601
- * @param {?} selectdFile
1602
- * @return {?}
1603
- */
1604
- FileUploadComponent.prototype.getImageUrl = /**
1605
- * @param {?} selectdFile
1606
- * @return {?}
1607
- */
1608
- function (selectdFile) {
1609
- var _this = this;
1610
- return new Promise((/**
1611
- * @param {?} resolve
1612
- * @return {?}
1613
- */
1614
- function (resolve) {
1615
- /** @type {?} */
1616
- var reader = new FileReader();
1617
- reader.readAsDataURL(selectdFile);
1618
- reader.onload = (/**
1619
- * @param {?} _event
1620
- * @return {?}
1621
- */
1622
- function (_event) {
1623
- /** @type {?} */
1624
- var imgUrl = reader.result;
1625
- if (_this.injector != null) {
1626
- /** @type {?} */
1627
- var sanitizer = _this.injector.get(DomSanitizer);
1628
- imgUrl = sanitizer.bypassSecurityTrustResourceUrl(imgUrl);
1629
- }
1630
- resolve(imgUrl);
1631
- });
1632
- }));
1701
+ }
1633
1702
  };
1634
1703
  /**
1635
1704
  * @param {?} strList
@@ -1726,9 +1795,6 @@ var FileUploadComponent = /** @class */ (function () {
1726
1795
  * @return {?}
1727
1796
  */
1728
1797
  function (x) { return x.isUploading || x.uploadResult; })).length) {
1729
- // this.notifyService.success(<NotifyOptions>{
1730
- // msg: '保存成功!', timeout: 3000
1731
- // });
1732
1798
  this.msgService.warning(this.localepipe.transform('wait'));
1733
1799
  return of$1(false);
1734
1800
  }
@@ -1809,9 +1875,6 @@ var FileUploadComponent = /** @class */ (function () {
1809
1875
  */
1810
1876
  function (x) { return x.metadataId == file.id; })), 1);
1811
1877
  }
1812
- // var obj:any = document.querySelector('#file');
1813
- // obj.files.remove();
1814
- //obj.value='';
1815
1878
  };
1816
1879
  /**
1817
1880
  * @param {?} size
@@ -1924,6 +1987,19 @@ var DownloadService = /** @class */ (function () {
1924
1987
  function (metadataId, rootId) {
1925
1988
  return "/api/runtime/dfs/v1.0/doc/filecontent?metadataid=" + metadataId + "&rootid=" + rootId + "&token=" + this.getToken(this.mergeString(metadataId, rootId));
1926
1989
  };
1990
+ /**
1991
+ * @param {?} metadataId
1992
+ * @param {?} rootId
1993
+ * @return {?}
1994
+ */
1995
+ DownloadService.prototype.getStreamDownloadUrl = /**
1996
+ * @param {?} metadataId
1997
+ * @param {?} rootId
1998
+ * @return {?}
1999
+ */
2000
+ function (metadataId, rootId) {
2001
+ return "/api/runtime/dfs/v1.0/formdoc/stream?metadataid=" + metadataId + "&rootid=" + rootId + "&token=" + this.getToken(this.mergeString(metadataId, rootId));
2002
+ };
1927
2003
  /**
1928
2004
  * @param {?} metadataIdList
1929
2005
  * @param {?} rootId
@@ -2417,6 +2493,16 @@ var GspFormUploadListEntity = /** @class */ (function () {
2417
2493
  return GspFormUploadListEntity;
2418
2494
  }());
2419
2495
 
2496
+ /**
2497
+ * @fileoverview added by tsickle
2498
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2499
+ */
2500
+ var GspFormDocInfo = /** @class */ (function () {
2501
+ function GspFormDocInfo() {
2502
+ }
2503
+ return GspFormDocInfo;
2504
+ }());
2505
+
2420
2506
  /**
2421
2507
  * @fileoverview added by tsickle
2422
2508
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -2427,6 +2513,16 @@ var GspDocMetaProperty = /** @class */ (function () {
2427
2513
  return GspDocMetaProperty;
2428
2514
  }());
2429
2515
 
2516
+ /**
2517
+ * @fileoverview added by tsickle
2518
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2519
+ */
2520
+ var GspFormUploadEntity = /** @class */ (function () {
2521
+ function GspFormUploadEntity() {
2522
+ }
2523
+ return GspFormUploadEntity;
2524
+ }());
2525
+
2430
2526
  /**
2431
2527
  * @fileoverview added by tsickle
2432
2528
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc