liangzimixin 0.3.50 → 0.3.51

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.
package/dist/index.cjs CHANGED
@@ -17857,10 +17857,23 @@ async function uploadMedia(params) {
17857
17857
  chunkSize: chunkSizeMb * 1024 * 1024,
17858
17858
  category: 1
17859
17859
  });
17860
+ if (initResult.deduplicatedHit && initResult.fileKey) {
17861
+ log2.info("upload:dedup hit \u26A1", {
17862
+ fileName,
17863
+ fileKey: initResult.fileKey,
17864
+ fileSize: initResult.fileSize
17865
+ });
17866
+ return {
17867
+ fileKey: initResult.fileKey,
17868
+ fileUrl: initResult.fileUrl || "",
17869
+ fileSize: initResult.fileSize || buffer.length,
17870
+ mimeType: initResult.mimeType || mimeType
17871
+ };
17872
+ }
17860
17873
  const { uploadId } = initResult;
17861
17874
  let { parts } = initResult;
17862
17875
  const chunkSize = initResult.chunkSize;
17863
- log2.info("upload:init ok", { uploadId, totalChunks: initResult.totalChunks, chunkSize, initResult });
17876
+ log2.info("upload:init ok", { uploadId, totalChunks: initResult.totalChunks, chunkSize });
17864
17877
  const chunks = splitBuffer(buffer, chunkSize);
17865
17878
  const completedParts = [];
17866
17879
  for (let i = 0; i < chunks.length; i++) {
@@ -3949,10 +3949,23 @@ async function uploadMedia(params) {
3949
3949
  chunkSize: chunkSizeMb * 1024 * 1024,
3950
3950
  category: 1
3951
3951
  });
3952
+ if (initResult.deduplicatedHit && initResult.fileKey) {
3953
+ log2.info("upload:dedup hit \u26A1", {
3954
+ fileName,
3955
+ fileKey: initResult.fileKey,
3956
+ fileSize: initResult.fileSize
3957
+ });
3958
+ return {
3959
+ fileKey: initResult.fileKey,
3960
+ fileUrl: initResult.fileUrl || "",
3961
+ fileSize: initResult.fileSize || buffer.length,
3962
+ mimeType: initResult.mimeType || mimeType
3963
+ };
3964
+ }
3952
3965
  const { uploadId } = initResult;
3953
3966
  let { parts } = initResult;
3954
3967
  const chunkSize = initResult.chunkSize;
3955
- log2.info("upload:init ok", { uploadId, totalChunks: initResult.totalChunks, chunkSize, initResult });
3968
+ log2.info("upload:init ok", { uploadId, totalChunks: initResult.totalChunks, chunkSize });
3956
3969
  const chunks = splitBuffer(buffer, chunkSize);
3957
3970
  const completedParts = [];
3958
3971
  for (let i = 0; i < chunks.length; i++) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "liangzimixin",
3
- "version": "0.3.50",
3
+ "version": "0.3.51",
4
4
  "description": "Quantum-encrypted IM channel plugin for OpenClaw",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",