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:
Richelly Italo 2018-07-26 15:40:47 -03:00 committed by GitHub
parent 9fb77c5f2f
commit 9b8e03f7a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -281,6 +281,10 @@ class SpacesConnect {
}
catch (\Exception $e) {
$this->HandleAWSException($e);
} finally {
if (is_file($pathToFile)) {
fclose($file);
}
}
}