mirror of
https://github.com/SociallyDev/Spaces-API.git
synced 2025-07-05 20:41:31 -07:00
Merge pull request #19 from markruys/master
Suppress warning in case a blob is uploaded
This commit is contained in:
commit
35f2e15d1d
1 changed files with 3 additions and 2 deletions
|
@ -260,7 +260,8 @@ class SpacesConnect {
|
|||
if($access == "public") {
|
||||
$access = "public-read";
|
||||
}
|
||||
if(!is_file($pathToFile)){
|
||||
$is_file = strlen($pathToFile) <= PHP_MAXPATHLEN && is_file($pathToFile);
|
||||
if(!$is_file){
|
||||
$file = $pathToFile;
|
||||
}else{
|
||||
$file = fopen($pathToFile, 'r+');
|
||||
|
@ -284,7 +285,7 @@ class SpacesConnect {
|
|||
catch (\Exception $e) {
|
||||
$this->HandleAWSException($e);
|
||||
} finally {
|
||||
if (is_file($pathToFile)) {
|
||||
if ($is_file) {
|
||||
fclose($file);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue