on upload trigger

Need help with FileZilla Server? Something does not work as expected? In this forum you may find an answer.

Moderator: Project members

Post Reply
Message
Author
eddyk
500 Command not understood
Posts: 1
Joined: 2005-06-30 21:13

on upload trigger

#1 Post by eddyk » 2005-06-30 21:34

First I'd like to say Fillezilla is a well done piece of software. I've tried a couple of other daemons on the windows platform, and filezilla is rock solid.

Now a quick explanation of the situation I've got.

I have webcam software which allows transferring jpegs of the camera images via ftp. I can't configure very much with respect to the client. The server ip, username/password and the directory and filename to drop the image file off is all I've got to play with.

On the server side, I've got filezilla which can take those files at the sustained rate without dying like every other windows based server I've tried. The only problem is, I need to know when the upload is completed so that I can copy the image to an archive folder so that I can do various processing on series of images.

wzdftpd has an onupload feature which calls a user defined script (tcl or perl) on completion of an upload, which is exactly what I need. however it can't handle the upload rate that the client hit it with.

Is that feature in right now, or planned? Is there a workaround that anyone can think of?

I'd do it myself, except it looks like your using msvc, and not g++ for the windows builds. I don't have access to msvc. (please correct me if I'm wrong here).

Thanks,
Eddy

nickallen
500 Command not understood
Posts: 3
Joined: 2005-08-09 15:22

#2 Post by nickallen » 2005-08-09 15:42

Depending on your update rate and f the file has a predictable name or will be the only file in a folder, or if it would be sufficient to search for the file with the latest date in that folder then perhaps you could write a script to poll that directory and:
a) test for that file's existence
b) if it exists then try to open that file in rw mode - if it fails it's still being uploaded, if it succeeds, close the file again, then perform your action.

I know polling isn't as good as event driven but it could be a workaround for now?

Nick.

josefresno
500 Command not understood
Posts: 2
Joined: 2007-03-13 16:59

Process file on completion

#3 Post by josefresno » 2007-05-09 16:35

Hi,

For very large file, if the file transfer is interrupted, then the rw mode gets set back, and my filewatcher processes the file. I was wondering if there is any way of determining whether the file has _completely_ uploaded and is valid?

Thanks,
-Joe
nickallen wrote:Depending on your update rate and f the file has a predictable name or will be the only file in a folder, or if it would be sufficient to search for the file with the latest date in that folder then perhaps you could write a script to poll that directory and:
a) test for that file's existence
b) if it exists then try to open that file in rw mode - if it fails it's still being uploaded, if it succeeds, close the file again, then perform your action.

I know polling isn't as good as event driven but it could be a workaround for now?

Nick.

Post Reply