Fixed a bug in FTP upload hook, other minor improvements
* Ensure we have write permissions on any newly uploaded files by FTP * Don't silence warnings in moveFileToStor() * Reduced the FTP upload max retry count * Log E_NOTICE and E_WARNING levels to Sentry
This commit is contained in:
parent
bc2acaea51
commit
d1b28fd564
4 changed files with 9 additions and 3 deletions
|
@ -986,13 +986,12 @@ SQL;
|
|||
|
||||
// Martin K.: changed to rename: Much less load + quicker since this is
|
||||
// an atomic operation
|
||||
if (@rename($audio_file, $audio_stor) === false) {
|
||||
if (rename($audio_file, $audio_stor) === false) {
|
||||
//something went wrong likely there wasn't enough space in .
|
||||
//the audio_stor to move the file too warn the user that .
|
||||
//the file wasn't uploaded and they should check if there .
|
||||
//is enough disk space .
|
||||
unlink($audio_file); //remove the file after failed rename
|
||||
//unlink($id_file); // Also remove the identifier file
|
||||
|
||||
throw new Exception("The file was not uploaded, this error can occur if the computer "
|
||||
. "hard drive does not have enough disk space or the stor "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue