@bytescale/sdk 3.9.1 → 3.10.0

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.
@@ -1959,7 +1959,9 @@ var UploadManagerBase = /*#__PURE__*/function () {
1959
1959
  size = _ref$value.size,
1960
1960
  type = _ref$value.type;
1961
1961
  return {
1962
- mime: type,
1962
+ // Some browsers/OSs return 'type: ""' for files with unknown MIME types, like HEICs, which causes a validation
1963
+ // error from the Bytescale API as "" is not a valid MIME type, so we coalesce to undefined here.
1964
+ mime: type === "" ? undefined : type,
1963
1965
  size: size,
1964
1966
  originalFileName: name,
1965
1967
  maxConcurrentUploadParts: undefined
@@ -1944,7 +1944,9 @@ var UploadManagerBase = /*#__PURE__*/function () {
1944
1944
  size = _ref$value.size,
1945
1945
  type = _ref$value.type;
1946
1946
  return {
1947
- mime: type,
1947
+ // Some browsers/OSs return 'type: ""' for files with unknown MIME types, like HEICs, which causes a validation
1948
+ // error from the Bytescale API as "" is not a valid MIME type, so we coalesce to undefined here.
1949
+ mime: type === "" ? undefined : type,
1948
1950
  size: size,
1949
1951
  originalFileName: name,
1950
1952
  maxConcurrentUploadParts: undefined
@@ -1959,7 +1959,9 @@ var UploadManagerBase = /*#__PURE__*/function () {
1959
1959
  size = _ref$value.size,
1960
1960
  type = _ref$value.type;
1961
1961
  return {
1962
- mime: type,
1962
+ // Some browsers/OSs return 'type: ""' for files with unknown MIME types, like HEICs, which causes a validation
1963
+ // error from the Bytescale API as "" is not a valid MIME type, so we coalesce to undefined here.
1964
+ mime: type === "" ? undefined : type,
1963
1965
  size: size,
1964
1966
  originalFileName: name,
1965
1967
  maxConcurrentUploadParts: undefined
@@ -1946,7 +1946,9 @@ var UploadManagerBase = /*#__PURE__*/function () {
1946
1946
  size = _ref$value.size,
1947
1947
  type = _ref$value.type;
1948
1948
  return {
1949
- mime: type,
1949
+ // Some browsers/OSs return 'type: ""' for files with unknown MIME types, like HEICs, which causes a validation
1950
+ // error from the Bytescale API as "" is not a valid MIME type, so we coalesce to undefined here.
1951
+ mime: type === "" ? undefined : type,
1950
1952
  size: size,
1951
1953
  originalFileName: name,
1952
1954
  maxConcurrentUploadParts: undefined
@@ -1959,7 +1959,9 @@ var UploadManagerBase = /*#__PURE__*/function () {
1959
1959
  size = _ref$value.size,
1960
1960
  type = _ref$value.type;
1961
1961
  return {
1962
- mime: type,
1962
+ // Some browsers/OSs return 'type: ""' for files with unknown MIME types, like HEICs, which causes a validation
1963
+ // error from the Bytescale API as "" is not a valid MIME type, so we coalesce to undefined here.
1964
+ mime: type === "" ? undefined : type,
1963
1965
  size: size,
1964
1966
  originalFileName: name,
1965
1967
  maxConcurrentUploadParts: undefined
@@ -1944,7 +1944,9 @@ var UploadManagerBase = /*#__PURE__*/function () {
1944
1944
  size = _ref$value.size,
1945
1945
  type = _ref$value.type;
1946
1946
  return {
1947
- mime: type,
1947
+ // Some browsers/OSs return 'type: ""' for files with unknown MIME types, like HEICs, which causes a validation
1948
+ // error from the Bytescale API as "" is not a valid MIME type, so we coalesce to undefined here.
1949
+ mime: type === "" ? undefined : type,
1948
1950
  size: size,
1949
1951
  originalFileName: name,
1950
1952
  maxConcurrentUploadParts: undefined
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytescale/sdk",
3
- "version": "3.9.1",
3
+ "version": "3.10.0",
4
4
  "description": "Bytescale JavaScript SDK",
5
5
  "author": "Bytescale <hello@bytescale.com> (https://www.bytescale.com)",
6
6
  "license": "MIT",