Skip to content

Commit 5aca7b6

Browse files
committed
Better code example
1 parent 4855704 commit 5aca7b6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ $soapResponse = $yourSoapClient->request('Foo', $soapPayload);
9090
$attachments = $attachmentsStorage->responseAttachments()
9191

9292
foreach ($attachments as $attachment) {
93-
FileStream::create('path/to/your.pdf', FileStream::WRITE_MODE)->copyFrom($attachment->content);
93+
$attachment->content->copyTo(
94+
FileStream::create('path/to/your/'.$attachment->filename, FileStream::WRITE_MODE)
95+
);
9496
}
9597
```
9698

0 commit comments

Comments
 (0)