@eyepop.ai/eyepop 3.25.0 → 3.25.1

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.
@@ -9828,6 +9828,9 @@ function readableStreamFromString(s) {
9828
9828
  function randomMultipartBoundary() {
9829
9829
  return `----formdata-boundary-${uuidv4()}`;
9830
9830
  }
9831
+ function escapeDispositionValue(value) {
9832
+ return value.replace(/"/g, "%22").replace(/\r/g, "%0D").replace(/\n/g, "%0A");
9833
+ }
9831
9834
  function toPartStream(content) {
9832
9835
  if (content instanceof ReadableStream) {
9833
9836
  return content;
@@ -9872,8 +9875,11 @@ function encodeMultipartFormData(parts, boundary) {
9872
9875
  }
9873
9876
  const part = parts[partIndex];
9874
9877
  let header = `--${boundary}\r
9875
- Content-Disposition: form-data; name="${part.name}"\r
9876
- `;
9878
+ Content-Disposition: form-data; name="${escapeDispositionValue(part.name)}"`;
9879
+ if (part.filename !== void 0) {
9880
+ header += `; filename="${escapeDispositionValue(part.filename)}"`;
9881
+ }
9882
+ header += "\r\n";
9877
9883
  if (part.contentType) {
9878
9884
  header += `Content-Type: ${part.contentType}\r
9879
9885
  `;
@@ -10626,7 +10632,7 @@ var UploadGroupJob = class extends AbstractJob {
10626
10632
  parts.push({ name: "camera", contentType: "application/json", content: JSON.stringify(this._params.camera) });
10627
10633
  }
10628
10634
  for (const source of this._sources) {
10629
- parts.push({ name: "file", contentType: source.mimeType, content: source.stream });
10635
+ parts.push({ name: "file", filename: "blob", contentType: source.mimeType, content: source.stream });
10630
10636
  }
10631
10637
  const boundary = randomMultipartBoundary();
10632
10638
  const headers = {