Solved

How to wait for file to be closed before reading

Posted on 2014-11-14
1
83 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

863 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now