Skip to content

Commit b71e948

Browse files
authored
Dont put the full file body as filename (#478)
1 parent d55bd56 commit b71e948

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/MultipartStream.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ private function addElement(AppendStream $stream, array $element): void
8989

9090
if (empty($element['filename'])) {
9191
$uri = $element['contents']->getMetadata('uri');
92-
if ($uri && \is_string($uri) && \substr($uri, 0, 6) !== 'php://') {
92+
if ($uri && \is_string($uri) && \substr($uri, 0, 6) !== 'php://' && \substr($uri, 0, 7) !== 'data://') {
9393
$element['filename'] = $uri;
9494
}
9595
}

0 commit comments

Comments
 (0)