@swan-admin/swan-ai-measurements 1.0.85 → 1.0.86

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.
@@ -72,6 +72,7 @@ class FileUpload {
72
72
  __classPrivateFieldSet(this, _FileUpload_uppyIns, new Uppy({ autoProceed: true }), "f");
73
73
  __classPrivateFieldGet(this, _FileUpload_uppyIns, "f").use(AwsS3Multipart, {
74
74
  limit: 10,
75
+ companionUrl: "http://localhost:3002/",
75
76
  retryDelays: [0, 1000, 3000, 5000],
76
77
  getChunkSize: () => 5 * 1024 * 1024,
77
78
  createMultipartUpload: (file) => {
@@ -107,16 +108,6 @@ class FileUpload {
107
108
  partNumber: partData.partNumber,
108
109
  },
109
110
  }),
110
- abortMultipartUpload: (file, { uploadId, key }) =>
111
- fetchData({
112
- path: UPPY_FILE_UPLOAD_ENDPOINT.UPLOAD_ABORT,
113
- apiKey: __classPrivateFieldGet(this, _FileUpload_accessKey, "f"),
114
- body: {
115
- uploadId,
116
- objectKey: key,
117
- originalFileName: file.name,
118
- },
119
- }),
120
111
  });
121
112
  __classPrivateFieldGet(this, _FileUpload_uppyIns, "f").addFile({
122
113
  source: "manual",
@@ -24,6 +24,7 @@ class FileUpload {
24
24
  this.#uppyIns = new Uppy.default({ autoProceed: true });
25
25
  this.#uppyIns.use(AwsS3Multipart.default, {
26
26
  limit: 10,
27
+ companionUrl: "http://localhost:3002/",
27
28
  retryDelays: [0, 1000, 3000, 5000],
28
29
  getChunkSize: () => 5 * 1024 * 1024,
29
30
  createMultipartUpload: (file) => {
@@ -57,15 +58,6 @@ class FileUpload {
57
58
  partNumber: partData.partNumber,
58
59
  },
59
60
  }),
60
- abortMultipartUpload: (file, { uploadId, key }) => (0, utils_js_1.fetchData)({
61
- path: constants_js_1.UPPY_FILE_UPLOAD_ENDPOINT.UPLOAD_ABORT,
62
- apiKey: this.#accessKey,
63
- body: {
64
- uploadId,
65
- objectKey: key,
66
- originalFileName: file.name,
67
- },
68
- }),
69
61
  });
70
62
  this.#uppyIns.addFile({
71
63
  source: "manual",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swan-admin/swan-ai-measurements",
3
- "version": "1.0.85",
3
+ "version": "1.0.86",
4
4
  "description": "provides ai measurement suggestion",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/esm/index.js",
package/src/fileUpload.ts CHANGED
@@ -43,6 +43,7 @@ export default class FileUpload {
43
43
  this.#uppyIns = new Uppy.default({ autoProceed: true });
44
44
  this.#uppyIns.use(AwsS3Multipart.default, {
45
45
  limit: 10,
46
+ companionUrl: "http://localhost:3002/",
46
47
  retryDelays: [0, 1000, 3000, 5000],
47
48
  getChunkSize: () => 5 * 1024 * 1024,
48
49
  createMultipartUpload: (file: any) => {
@@ -79,17 +80,6 @@ export default class FileUpload {
79
80
  partNumber: partData.partNumber,
80
81
  },
81
82
  }),
82
-
83
- abortMultipartUpload: (file: any, { uploadId, key }: { uploadId: string | number; key: string | number }) =>
84
- fetchData({
85
- path: UPPY_FILE_UPLOAD_ENDPOINT.UPLOAD_ABORT,
86
- apiKey: this.#accessKey,
87
- body: {
88
- uploadId,
89
- objectKey: key,
90
- originalFileName: file.name,
91
- },
92
- }),
93
83
  });
94
84
 
95
85
  this.#uppyIns.addFile({