mirror of
https://github.com/SociallyDev/Spaces-API.git
synced 2025-07-14 17:13:01 -07:00
Added privacy setting to text upload
This commit is contained in:
parent
8ff8498a22
commit
7c915822bf
7 changed files with 151 additions and 94 deletions
|
@ -33,7 +33,7 @@ foreach ($files['files'] as $file) {
|
|||
|
||||
```php
|
||||
$space = new Spaces('api-key', 'api-secret')->space('my-space-name');
|
||||
$file = $space->uploadFile('./localfile.txt');
|
||||
$file = $space->uploadFile('./localfile.txt', 'remote-filename.txt');
|
||||
```
|
||||
[API docs for uploading files](Space.md#spaceuploadfile)
|
||||
|
||||
|
|
|
@ -492,7 +492,7 @@ Upload a file
|
|||
**Description**
|
||||
|
||||
```php
|
||||
public uploadText (string $text, string $filename, array $params => [])
|
||||
public uploadText (string $text, string $filename, array $params = [], bool $private = true)
|
||||
```
|
||||
|
||||
Upload a string of text to file
|
||||
|
@ -507,6 +507,8 @@ Upload a string of text to file
|
|||
: The filepath/name to save to
|
||||
* `(array) $params`
|
||||
: Any extra parameters. [See here](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#upload-property)
|
||||
* `(bool) $private`
|
||||
: True for the file to be private, false to allow public access
|
||||
|
||||
**Return Values**
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue