| @@ -31,9 +31,9 @@ | ||
| 31 | 31 | public function __construct(callable $nextHandler) |
| 32 | 32 | { |
| 33 | 33 | $this->nextHandler = $nextHandler; |
| 34 | 34 | } |
| 35 | - public function __invoke(CommandInterface $command, RequestInterface $request = null) | |
| 35 | + public function __invoke(CommandInterface $command, ?RequestInterface $request = null) | |
| 36 | 36 | { |
| 37 | 37 | $next = $this->nextHandler; |
| 38 | 38 | return $next($command, $request)->then(function (ResultInterface $result) use($command) { |
| 39 | 39 | $name = $command->getName(); |
| @@ -42,9 +42,9 @@ | ||
| 42 | 42 | case 'CopyObject': |
| 43 | 43 | $result['ObjectURL'] = isset($result['@metadata']['effectiveUri']) ? $result['@metadata']['effectiveUri'] : null; |
| 44 | 44 | break; |
| 45 | 45 | case 'CompleteMultipartUpload': |
| 46 | - $result['ObjectURL'] = $result['Location']; | |
| 46 | + $result['ObjectURL'] = \urldecode($result['Location'] ?? ''); | |
| 47 | 47 | break; |
| 48 | 48 | } |
| 49 | 49 | return $result; |
| 50 | 50 | }); |