mirror of
https://github.com/SociallyDev/Spaces-API.git
synced 2025-07-06 04:51:32 -07:00
Suppress warning in case a blob is uploaded
This commit is contained in:
parent
22880123ef
commit
8605232e87
1 changed files with 3 additions and 2 deletions
|
@ -259,7 +259,8 @@ class SpacesConnect {
|
||||||
if($access == "public") {
|
if($access == "public") {
|
||||||
$access = "public-read";
|
$access = "public-read";
|
||||||
}
|
}
|
||||||
if(!is_file($pathToFile)){
|
$is_file = strlen($pathToFile) <= PHP_MAXPATHLEN && is_file($pathToFile);
|
||||||
|
if(!$is_file){
|
||||||
$file = $pathToFile;
|
$file = $pathToFile;
|
||||||
}else{
|
}else{
|
||||||
$file = fopen($pathToFile, 'r+');
|
$file = fopen($pathToFile, 'r+');
|
||||||
|
@ -283,7 +284,7 @@ class SpacesConnect {
|
||||||
catch (\Exception $e) {
|
catch (\Exception $e) {
|
||||||
$this->HandleAWSException($e);
|
$this->HandleAWSException($e);
|
||||||
} finally {
|
} finally {
|
||||||
if (is_file($pathToFile)) {
|
if ($is_file) {
|
||||||
fclose($file);
|
fclose($file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue