Solved

How to wait for file to be closed before reading

Posted on 2014-11-14
1
81 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
Comment Utility
Never mind, solved this by setting the "hide files during upload" setting on proftpd server and skipping files beginning with .in.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
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 create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

771 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

11 Experts available now in Live!

Get 1:1 Help Now