Skip to content

Commit 3006015

Browse files
Also skip setting filename if URI starts with data:// (#55)
1 parent 11c1d31 commit 3006015

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/MultipartStreamBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public function addResource($name, $resource, array $options = [])
114114
if (empty($options['filename'])) {
115115
$options['filename'] = null;
116116
$uri = $stream->getMetadata('uri');
117-
if ('php://' !== substr($uri, 0, 6)) {
117+
if ('php://' !== substr($uri, 0, 6) && 'data://' !== substr($uri, 0, 7)) {
118118
$options['filename'] = $uri;
119119
}
120120
}

0 commit comments

Comments
 (0)