@medialane/sdk 0.190.0 → 0.191.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.
package/dist/index.cjs CHANGED
@@ -822,13 +822,12 @@ var MAX_IPFS_GATEWAY_RESPONSE_BYTES = 25 * 1024 * 1024;
822
822
 
823
823
  // src/uploads.ts
824
824
  var MB = 1024 * 1024;
825
+ var MAX_UPLOAD_BYTES = 90 * MB;
825
826
  var UPLOAD_LIMITS = {
826
827
  image: {
827
- maxBytes: 50 * MB,
828
828
  mimeTypes: ["image/jpeg", "image/png", "image/gif", "image/svg+xml", "image/webp"]
829
829
  },
830
830
  document: {
831
- maxBytes: 20 * MB,
832
831
  mimeTypes: [
833
832
  "application/pdf",
834
833
  "application/msword",
@@ -841,7 +840,6 @@ var UPLOAD_LIMITS = {
841
840
  ]
842
841
  },
843
842
  media: {
844
- maxBytes: 100 * MB,
845
843
  mimeTypes: [
846
844
  "image/jpeg",
847
845
  "image/png",
@@ -866,10 +864,9 @@ function formatFileSize(bytes) {
866
864
  return `${Number.isInteger(mb) ? mb : mb.toFixed(1)} MB`;
867
865
  }
868
866
  function uploadSizeError(file, kind = "image") {
869
- const { maxBytes } = UPLOAD_LIMITS[kind];
870
- if (file.size <= maxBytes) return null;
867
+ if (file.size <= MAX_UPLOAD_BYTES) return null;
871
868
  const noun = kind === "image" ? "image" : "file";
872
- return `That ${noun} is ${formatFileSize(file.size)}. Please choose one under ${formatFileSize(maxBytes)}.`;
869
+ return `That ${noun} is ${formatFileSize(file.size)}. Please choose one under ${formatFileSize(MAX_UPLOAD_BYTES)}.`;
873
870
  }
874
871
 
875
872
  Object.defineProperty(exports, "ApiClient", {
@@ -1180,6 +1177,7 @@ exports.IPFS_SAFE_CONTENT_TYPE_PREFIXES = IPFS_SAFE_CONTENT_TYPE_PREFIXES;
1180
1177
  exports.MAX_IMAGE_PROXY_BYTES = MAX_IMAGE_PROXY_BYTES;
1181
1178
  exports.MAX_IMAGE_REDIRECTS = MAX_IMAGE_REDIRECTS;
1182
1179
  exports.MAX_IPFS_GATEWAY_RESPONSE_BYTES = MAX_IPFS_GATEWAY_RESPONSE_BYTES;
1180
+ exports.MAX_UPLOAD_BYTES = MAX_UPLOAD_BYTES;
1183
1181
  exports.OPEN_LICENSES = OPEN_LICENSES;
1184
1182
  exports.RESERVED_TRAITS = RESERVED_TRAITS;
1185
1183
  exports.RunRequestError = RunRequestError;