Procesing files received via ftp

Stephen Han kruegger@REDACTED
Wed Sep 7 10:39:47 CEST 2005


I used to put the file with temp name and client renaming the file name 
after finishing uploading the file. Of course the server is polling the 
specific file name extension on the other hand.
However, I found out that this is not enough. Occasionally and specially the 
file system is NFS and the file is big, this doesn't work well.
 So I come up with other method. Each file consist of 2 component. Real file 
and specification file.
 Ex) 
 - A.exe + A.spec : A.spec has MD5 hash of A.exe and file name
- Upload A.exe first
- Upload A.spec.lock
- Rename A.spec.lock to A.spec
- Meanwhile Server polling *.spec 
- Read A.spec
- MD5 (A.exe) and compare with MD5 value in A.spec
- Finally get the A.exe


 On 8/30/05, Sebastian Bello <sebastian@REDACTED> wrote: 
> 
> Hi list,
>  I need to process files received via ftp.
> I see two approaches:
>   1. poll the ftp directory
>  How can I make sure a file download has finished?
>   2. use a specialized ftp server which triggers file processing after 
> receipt.
>  I've been trying the Erlang ftpd implementation. File uploads seems not 
> to work with a Windows client. And I'm not 100% sure they work fine with a 
> Linux one. Has anybody used ftpd in a production environment?
>  Any hints?
>  Thanks,
>  Sebastian-
>      
> *Prepaid Expertise - Programmable Switches 
> Powered by Ericsson Licensed Technology
> Sebastián Bello - Engineer - Development Center - IN Switch Solutions Inc.
> Headquarters - Miami-U.S.A. Tel: 1305-3578076 Fax: 1305-7686260
> Development Center - Montevideo - Uruguay Tel/Fax: 5982-7104457
> IN SWITCH EMEA Phone: +33 0 6 0335 9427 - Fax: +33 0 4 93655773 / 
> emea@REDACTED
> IN SWITCH ASIA Phone: +92 51 2800397/8- Fax: +92 51 2800399/ 
> inswasia@REDACTED
> e-mail: sebastian@REDACTED
> *
> **
> 
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20050907/c98007a8/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 1429 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20050907/c98007a8/attachment.gif>


More information about the erlang-questions mailing list