Skip to content

Commit

Permalink
Dont put the full file body as filename (#478)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyholm committed Mar 13, 2022
1 parent d55bd56 commit b71e948
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MultipartStream.php
Expand Up @@ -89,7 +89,7 @@ private function addElement(AppendStream $stream, array $element): void

if (empty($element['filename'])) {
$uri = $element['contents']->getMetadata('uri');
if ($uri && \is_string($uri) && \substr($uri, 0, 6) !== 'php://') {
if ($uri && \is_string($uri) && \substr($uri, 0, 6) !== 'php://' && \substr($uri, 0, 7) !== 'data://') {
$element['filename'] = $uri;
}
}
Expand Down

0 comments on commit b71e948

Please sign in to comment.