Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to wait for file to be closed before reading

Posted on 2014-11-14
1
Medium Priority
?
104 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
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 …
Suggested Courses

824 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