Solved

How to wait for file to be closed before reading

Posted on 2014-11-14
1
87 Views
Last Modified: 2014-11-14
I have my scanner here at the office FTP'ing scanned documents to a server.

Additionally, I have a php script running indefinitely checking the ftp upload folder and creating thumbnails for those PDF images.

The problem is, if the scanner hasn't finished writing the document to the ftp server, the script fails because it is not a valid PDF document.

I am using ghostscript to create the pdf preview if that helps and my ftp server is proftpd. The server is Ubuntu 14.04 LTS.
0
Comment
Question by:Mark
1 Comment
 

Accepted Solution

by:
Mark earned 0 total points
ID: 40443660
Never mind, solved this by setting the "hide files during upload" setting on proftpd server and skipping files beginning with .in.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
This article discusses four methods for overlaying images in a container on a web page
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question