@swan-admin/swan-ai-measurements 1.1.36 → 1.1.38
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/esm/fileUpload.js +4 -4
- package/dist/fileUpload.js +4 -4
- package/package.json +1 -1
package/dist/esm/fileUpload.js
CHANGED
|
@@ -22,8 +22,8 @@ var _FileUpload_uppyIns, _FileUpload_accessKey, _FileUpload_stagingUrl;
|
|
|
22
22
|
import axios from "axios";
|
|
23
23
|
import { REQUIRED_MESSAGE, REQUIRED_MESSAGE_FOR_META_DATA, FILE_UPLOAD_ENDPOINT, APP_AUTH_BASE_URL, REQUIRED_ERROR_MESSAGE_INVALID_EMAIL, } from "./constants.js";
|
|
24
24
|
import { addScanType, checkMetaDataValue, checkParameters, fetchData, getFileChunks, getUrl, isValidEmail } from "./utils.js";
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
import Uppy from "@uppy/core";
|
|
26
|
+
import AwsS3Multipart from "@uppy/aws-s3-multipart";
|
|
27
27
|
class FileUpload {
|
|
28
28
|
constructor(accessKey, stagingUrl = false) {
|
|
29
29
|
_FileUpload_uppyIns.set(this, void 0);
|
|
@@ -48,8 +48,8 @@ class FileUpload {
|
|
|
48
48
|
if (__classPrivateFieldGet(this, _FileUpload_uppyIns, "f")) {
|
|
49
49
|
__classPrivateFieldGet(this, _FileUpload_uppyIns, "f").close();
|
|
50
50
|
}
|
|
51
|
-
__classPrivateFieldSet(this, _FileUpload_uppyIns, new Uppy
|
|
52
|
-
__classPrivateFieldGet(this, _FileUpload_uppyIns, "f").use(AwsS3Multipart
|
|
51
|
+
__classPrivateFieldSet(this, _FileUpload_uppyIns, new Uppy({ autoProceed: true }), "f");
|
|
52
|
+
__classPrivateFieldGet(this, _FileUpload_uppyIns, "f").use(AwsS3Multipart, {
|
|
53
53
|
limit: 10,
|
|
54
54
|
retryDelays: [0, 1000, 3000, 5000],
|
|
55
55
|
companionUrl: getUrl({ urlName: APP_AUTH_BASE_URL, stagingUrl: __classPrivateFieldGet(this, _FileUpload_stagingUrl, "f") }),
|
package/dist/fileUpload.js
CHANGED
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const axios_1 = __importDefault(require("axios"));
|
|
7
7
|
const constants_js_1 = require("./constants.js");
|
|
8
8
|
const utils_js_1 = require("./utils.js");
|
|
9
|
-
const
|
|
10
|
-
const
|
|
9
|
+
const core_1 = __importDefault(require("@uppy/core"));
|
|
10
|
+
const aws_s3_multipart_1 = __importDefault(require("@uppy/aws-s3-multipart"));
|
|
11
11
|
class FileUpload {
|
|
12
12
|
#uppyIns;
|
|
13
13
|
#accessKey;
|
|
@@ -31,8 +31,8 @@ class FileUpload {
|
|
|
31
31
|
if (this.#uppyIns) {
|
|
32
32
|
this.#uppyIns.close();
|
|
33
33
|
}
|
|
34
|
-
this.#uppyIns = new
|
|
35
|
-
this.#uppyIns.use(
|
|
34
|
+
this.#uppyIns = new core_1.default({ autoProceed: true });
|
|
35
|
+
this.#uppyIns.use(aws_s3_multipart_1.default, {
|
|
36
36
|
limit: 10,
|
|
37
37
|
retryDelays: [0, 1000, 3000, 5000],
|
|
38
38
|
companionUrl: (0, utils_js_1.getUrl)({ urlName: constants_js_1.APP_AUTH_BASE_URL, stagingUrl: this.#stagingUrl }),
|