On Jun 20, 2004, at 8:13 PM, Sarah Reichelt wrote:
Hi All,
Pursuing my remote notification requirements, I am creating an HTML file which gets re-generated and uploaded to the server every few minutes. However FTP uploads don't always work, but I don't want to be left with a situation where I upload half a file, leaving nothing that is readable by a web browser.
A good solution would seem to be to upload the file using a temporary file name, check that the file length is the same as expected, then re-name the temporary file to the display file name. Is this a good way to go - perhaps people with more experience at FTP could suggest something better?
If this is a good plan, how do I do the renaming? Will I have to delete the original file first, or will the renaming automatically replace it?
Sarah,
I would do like this, set a invisible log field for libURL. This field will spot all info that occured in the transaction. This log field will be in the format
Number + Message + cr
It's according to FTP spec ( http://www.w3.org/Protocols/rfc959/Overview.html ) if you happen to stumble in a error you can parse the log field for the error. Also the log field will sport a nice line with the text : "you uploaded #num bytes and downloaded #num bytes" or something like that, just look for the line and check with your file size...
this aproach is easy and will not involve more traffic or complications than the ones you already have.
hope I help.
PS: the CGI-Tool stack uses a log field to display data to the user, it's amazing how much the log field will tell about a transaction.
Cheers Andre
Cheers, Sarah [EMAIL PROTECTED] http://www.troz.net/Rev/
_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
-- Andre Alves Garzia 2004 Soap Dog Studios - BRAZIL http://studio.soapdog.org
_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
