mirror of
https://github.com/SociallyDev/Spaces-API.git
synced 2025-07-07 21:41:29 -07:00
Support content type for UploadFile().
This commit is contained in:
parent
6301cb1adb
commit
0addc2cf7b
1 changed files with 6 additions and 5 deletions
|
@ -252,7 +252,7 @@ class SpacesConnect {
|
||||||
/*
|
/*
|
||||||
Upload a file.
|
Upload a file.
|
||||||
*/
|
*/
|
||||||
function UploadFile($pathToFile, $access = "private", $save_as = "") {
|
function UploadFile($pathToFile, $access = "private", $save_as = "", $mime_type = "application/octet-stream") {
|
||||||
if(empty($save_as)) {
|
if(empty($save_as)) {
|
||||||
$save_as = $pathToFile;
|
$save_as = $pathToFile;
|
||||||
}
|
}
|
||||||
|
@ -269,7 +269,8 @@ class SpacesConnect {
|
||||||
'Bucket' => $this->space,
|
'Bucket' => $this->space,
|
||||||
'Key' => $save_as,
|
'Key' => $save_as,
|
||||||
'Body' => $file,
|
'Body' => $file,
|
||||||
"ACL" => $access
|
'ACL' => $access,
|
||||||
|
'ContentType' => $mime_type
|
||||||
));
|
));
|
||||||
|
|
||||||
$this->client->waitUntil('ObjectExists', array(
|
$this->client->waitUntil('ObjectExists', array(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue