Watch Folder: Only process files that are completely uploaded
When using the Watchfolder feature, large documents that take a while to upload (I host mayan on a remote server) are often processed in an invalid state (not completely uploaded).
The watch-folder is hereby filled via sftp. Increasing the polling-intervall of the watchfolder makes this problem occuring less probable, but does not alleviate the issue completely.
Creating a custom inotify script which copies from my ftp-folder to another watch folder would shrink the vulnerable timeframe aswell, but would not eliminate the root cause.
Maybe the watch script could check the validity of pdfs to upload first or have a look at filedescriptors and postpone to work on uploaded files until the aforementioned conditions are given.
Edited by Tobias Mersmann