Skip to content

Commit ce79d4c

Browse files
committed
fix: support multipart upload boundaryId with quotes
1 parent 8e19a6f commit ce79d4c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/emulator/storage/multipart.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,11 @@ export function parseObjectUploadMultipartRequest(
125125
if (!contentTypeHeader.startsWith("multipart/related")) {
126126
throw new Error(`Invalid Content-Type: ${contentTypeHeader}`);
127127
}
128-
const boundaryId = contentTypeHeader.split("boundary=")[1];
128+
let boundaryId = contentTypeHeader.split("boundary=")[1];
129+
130+
// fix for supporting boundaryId with quotes
131+
boundaryId = boundaryId.replace(/"/g, "");
132+
129133
if (!boundaryId) {
130134
throw new Error(`Invalid Content-Type header: ${contentTypeHeader}`);
131135
}

0 commit comments

Comments
 (0)