diff --git a/docs/Space.md b/docs/Space.md index b78b97d..61082f1 100644 --- a/docs/Space.md +++ b/docs/Space.md @@ -463,7 +463,7 @@ Recursively upload an entire directory **Description** ```php -public uploadFile (string $filepath, string|null $filename = null) +public uploadFile (string $filepath, string|null $filename = null, string|null $mimeType = null, bool $private = true) ``` Upload a file @@ -476,6 +476,10 @@ Upload a file : The path to the file, including the filename. Relative and absolute paths are accepted. * `(string|null) $filename` : The remote filename. If `null`, the local filename will be used. Default `null` +* `(string|null) $mimeType` +: The files mimeType. If `null` the mimeType is inferred from the file by DigitalOcean Spaces. Default `null` +* `(bool)` $private +: If `true` then the file is private, if `false` the file is publicly available. Default `true` **Return Values** diff --git a/tests/SpaceTest.php b/tests/SpaceTest.php index 976d9f6..a16f70d 100644 --- a/tests/SpaceTest.php +++ b/tests/SpaceTest.php @@ -91,6 +91,7 @@ class SpaceTest extends TestCase $tmpFile = tempnam(sys_get_temp_dir(), 'spaces-test'); $file = self::$space->uploadFile($tmpFile, 'upload-test.txt', 'text/plain'); $this->assertInstanceOf(File::class, $file); + $this->assertEquals('text/plain', $file->content_type); } /**