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
|
@ -2,10 +2,14 @@
|
|||
|
||||
post_file() {
|
||||
#kill process after 30 minutes (360*5=30 minutes)
|
||||
max_retry=360
|
||||
max_retry=5
|
||||
retry_count=0
|
||||
|
||||
file_path="${1}"
|
||||
# Give us write permissions on the file to prevent problems if the user
|
||||
# uploads a read-only file.
|
||||
chmod +w "${file_path}"
|
||||
|
||||
#We must remove commas because CURL can't upload files with commas in the name
|
||||
# http://curl.haxx.se/mail/archive-2009-07/0029.html
|
||||
stripped_file_path=${file_path//','/''}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue