ztxkutils 2.10.66-5 → 2.10.66-6

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.
@@ -85,4 +85,11 @@ export declare function encodeFileIdByPreview(fileId: string): string;
85
85
  * @returns
86
86
  */
87
87
  export declare function encodeFileIdByDownload(fileId: string): string;
88
+ /**
89
+ * 附件预览的文件id加密。加密后只encode一次
90
+ * 用在那些通过body传参的业务里
91
+ * @param fileId
92
+ * @returns
93
+ */
94
+ export declare function encodeOneFileIdByDownload(fileId: string): string;
88
95
  export {};
@@ -334,6 +334,15 @@ function encodeFileIdByPreview(fileId) {
334
334
  */
335
335
  function encodeFileIdByDownload(fileId) {
336
336
  return encodeURIComponent(encodeURIComponent(crypto.encrypt(fileId)));
337
+ }
338
+ /**
339
+ * 附件预览的文件id加密。加密后只encode一次
340
+ * 用在那些通过body传参的业务里
341
+ * @param fileId
342
+ * @returns
343
+ */
344
+ function encodeOneFileIdByDownload(fileId) {
345
+ return encodeURIComponent(crypto.encrypt(fileId));
337
346
  }
338
347
 
339
- export { batchDownloadFileCallBack, batchPreviewFile, createDownloadUrl, createDownloadUrlNoBase, createOriginalUrl, createPublicDownloadUrl, createThumbnailUrl, downloadFile, downloadFileCallBack, downloadPublicFile, encodeFileIdByDownload, encodeFileIdByPreview, previewFile };
348
+ export { batchDownloadFileCallBack, batchPreviewFile, createDownloadUrl, createDownloadUrlNoBase, createOriginalUrl, createPublicDownloadUrl, createThumbnailUrl, downloadFile, downloadFileCallBack, downloadPublicFile, encodeFileIdByDownload, encodeFileIdByPreview, encodeOneFileIdByDownload, previewFile };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztxkutils",
3
- "version": "2.10.66-5",
3
+ "version": "2.10.66-6",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",