mirror of
https://github.com/SociallyDev/Spaces-API.git
synced 2025-07-16 10:03:01 -07:00
Close file after Upload ran
I saw here the need to delete the file and because it was already open (fopen) inside the library, exclusion was not allowed. Now always closing (fclose) the file, this is possible. This is most often used when you want to delete a temporary file after uploading.
This commit is contained in:
parent
9fb77c5f2f
commit
9b8e03f7a8
1 changed files with 4 additions and 0 deletions
|
@ -281,6 +281,10 @@ class SpacesConnect {
|
|||
}
|
||||
catch (\Exception $e) {
|
||||
$this->HandleAWSException($e);
|
||||
} finally {
|
||||
if (is_file($pathToFile)) {
|
||||
fclose($file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue