Skip to content

Commit

Permalink
fix: use retention only when provided
Browse files Browse the repository at this point in the history
  • Loading branch information
vishwarajanand committed Nov 29, 2023
1 parent 03b5ab0 commit 302f3c9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Storage/src/Connection/Rest.php
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,9 @@ private function resolveUploadOptions(array $args)
}

$args['metadata']['name'] = $args['name'];
$args['metadata']['retention'] = $args['retention'] ?? [];
if (isset($args['retention'])) {
$args['metadata']['retention'] = $args['retention'];
}
unset($args['name']);
unset($args['retention']);
$args['contentType'] = $args['metadata']['contentType']
Expand Down

0 comments on commit 302f3c9

Please sign in to comment.