@uploadcare/upload-client 6.0.1-alpha.6 → 6.0.1-alpha.7

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.
@@ -458,6 +458,10 @@ function retryIfFailed(fn, options) {
458
458
  }));
459
459
  }
460
460
 
461
+ function getStoreValue(store) {
462
+ return typeof store === 'undefined' ? 'auto' : store ? '1' : '0';
463
+ }
464
+
461
465
  /**
462
466
  * Performs file uploading request to Uploadcare Upload API.
463
467
  * Can be canceled and has progress.
@@ -478,10 +482,10 @@ function base(file, { publicKey, fileName, contentType, baseURL = defaultSetting
478
482
  contentType
479
483
  },
480
484
  UPLOADCARE_PUB_KEY: publicKey,
481
- // UPLOADCARE_STORE: getStoreValue(store),
482
- // signature: secureSignature,
483
- // expire: secureExpire,
484
- // source: source,
485
+ UPLOADCARE_STORE: getStoreValue(store),
486
+ signature: secureSignature,
487
+ expire: secureExpire,
488
+ source: source,
485
489
  metadata
486
490
  }),
487
491
  signal,
@@ -497,10 +501,6 @@ function base(file, { publicKey, fileName, contentType, baseURL = defaultSetting
497
501
  }), { retryNetworkErrorMaxTimes, retryThrottledRequestMaxTimes });
498
502
  }
499
503
 
500
- function getStoreValue(store) {
501
- return typeof store === 'undefined' ? 'auto' : store ? '1' : '0';
502
- }
503
-
504
504
  var TypeEnum;
505
505
  (function (TypeEnum) {
506
506
  TypeEnum["Token"] = "token";
@@ -482,6 +482,10 @@ function retryIfFailed(fn, options) {
482
482
  }));
483
483
  }
484
484
 
485
+ function getStoreValue(store) {
486
+ return typeof store === 'undefined' ? 'auto' : store ? '1' : '0';
487
+ }
488
+
485
489
  /**
486
490
  * Performs file uploading request to Uploadcare Upload API.
487
491
  * Can be canceled and has progress.
@@ -502,10 +506,10 @@ function base(file, { publicKey, fileName, contentType, baseURL = defaultSetting
502
506
  contentType
503
507
  },
504
508
  UPLOADCARE_PUB_KEY: publicKey,
505
- // UPLOADCARE_STORE: getStoreValue(store),
506
- // signature: secureSignature,
507
- // expire: secureExpire,
508
- // source: source,
509
+ UPLOADCARE_STORE: getStoreValue(store),
510
+ signature: secureSignature,
511
+ expire: secureExpire,
512
+ source: source,
509
513
  metadata
510
514
  }),
511
515
  signal,
@@ -521,10 +525,6 @@ function base(file, { publicKey, fileName, contentType, baseURL = defaultSetting
521
525
  }), { retryNetworkErrorMaxTimes, retryThrottledRequestMaxTimes });
522
526
  }
523
527
 
524
- function getStoreValue(store) {
525
- return typeof store === 'undefined' ? 'auto' : store ? '1' : '0';
526
- }
527
-
528
528
  var TypeEnum;
529
529
  (function (TypeEnum) {
530
530
  TypeEnum["Token"] = "token";
@@ -464,6 +464,10 @@ function retryIfFailed(fn, options) {
464
464
  }));
465
465
  }
466
466
 
467
+ function getStoreValue(store) {
468
+ return typeof store === 'undefined' ? 'auto' : store ? '1' : '0';
469
+ }
470
+
467
471
  /**
468
472
  * Performs file uploading request to Uploadcare Upload API.
469
473
  * Can be canceled and has progress.
@@ -484,10 +488,10 @@ function base(file, { publicKey, fileName, contentType, baseURL = defaultSetting
484
488
  contentType
485
489
  },
486
490
  UPLOADCARE_PUB_KEY: publicKey,
487
- // UPLOADCARE_STORE: getStoreValue(store),
488
- // signature: secureSignature,
489
- // expire: secureExpire,
490
- // source: source,
491
+ UPLOADCARE_STORE: getStoreValue(store),
492
+ signature: secureSignature,
493
+ expire: secureExpire,
494
+ source: source,
491
495
  metadata
492
496
  }),
493
497
  signal,
@@ -503,10 +507,6 @@ function base(file, { publicKey, fileName, contentType, baseURL = defaultSetting
503
507
  }), { retryNetworkErrorMaxTimes, retryThrottledRequestMaxTimes });
504
508
  }
505
509
 
506
- function getStoreValue(store) {
507
- return typeof store === 'undefined' ? 'auto' : store ? '1' : '0';
508
- }
509
-
510
510
  var TypeEnum;
511
511
  (function (TypeEnum) {
512
512
  TypeEnum["Token"] = "token";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uploadcare/upload-client",
3
- "version": "6.0.1-alpha.6",
3
+ "version": "6.0.1-alpha.7",
4
4
  "description": "Library for work with Uploadcare Upload API",
5
5
  "type": "module",
6
6
  "module": "./dist/index.node.js",