Skip to content

Commit c52d22a

Browse files
author
David Wakelin
committed
Allowed passing validation flag to Space::file()
1 parent 3a32727 commit c52d22a

4 files changed

Lines changed: 194 additions & 235 deletions

File tree

SpacesAPI/Space.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,13 +325,14 @@ public function uploadFile(string $filepath, ?string $filename = null, ?string $
325325
* Get an instance of \SpacesAPI\File for a given filename
326326
*
327327
* @param string $filename
328+
* @package bool $validate
328329
*
329330
* @return \SpacesAPI\File
330331
* @throws \SpacesAPI\Exceptions\FileDoesntExistException Thrown if the file doesn't exist
331332
*/
332-
public function file(string $filename): File
333+
public function file(string $filename, bool $validate = true): File
333334
{
334-
return new File($this, $filename);
335+
return new File($this, $filename, [], $validate);
335336
}
336337

337338
/**

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "sociallydev/spaces-api",
33
"description": "Library for accessing Digital Ocean spaces",
4-
"version":"3.5.0",
4+
"version":"3.6.0",
55
"type": "library",
66
"license": "MIT",
77
"authors": [

0 commit comments

Comments
 (0)