You're doing something wrong in your code. file size works just fine here, even in post STOR event.
Test using ioisotopehelper custom command:
[FTP_Custom_Commands]
ioIsotopeHelper = TCL ..\scripts\ioIsotope.itcl
Quote:
[23:14:32] [L] site ioisotopehelper cidx
[23:14:32] [L] 200-CIDX;3;Mouton;Admins;*;127.0.0.1;pomme2k3;download ;RETR test1.rar;/race/test/;/race/test/test1.rar;2004-02-28 23:14:12;20;18;5.0;196608;15000000;
[23:14:32] [L] 200 Command successful.
|
Last number is file size in bytes... See code below.
Test using post stor event:
[FTP_Post-Command_Events]
stor = TCL ..\scripts\ioIsotope.itcl cidx
Quote:
[23:14:40] [L] Opening data connection IP: 127.0.0.1 PORT: 1034
[23:14:40] [L] STOR SomeHeader.h
[23:14:40] [L] 150 Opening ASCII mode data connection for SomeHeader.h.
[23:14:40] [L] CIDX;3;Mouton;Admins;*;127.0.0.1;pomme2k3;download ;RETR test1.rar;/race/test/;/race/test/test1.rar;2004-02-28 23:14:12;28;26;5.0;196608;15000000;
[23:14:43] [L] 226 Transfer complete.
[23:14:43] Transferred: SomeHeader.h 6 KB in 2.22 (2.72 KBps)
|
Worked too... file size = 15000000 bytes...
itcl code used:
Quote:
switch $status {
0 { set status "idle" }
1 { set status "download" ; set filesize [file size [resolve pwd [lindex $data 8]]]}
2 { set status "upload" ; set filesize [file size [resolve pwd [lindex $data 8]]]}
3 { set status "list" }
}
iputs "CIDX;[lindex $data 0];[resolve uid [lindex $data 1]];[resolve gid $gid];[lindex $data 2];[lindex $data 3];[lindex $data 4];$status;[lindex $data 6];[lindex $data 7];[lindex $data 8];$logintime;$logindiff;[lindex $data 10];[lindex $data 11];[lindex $data 12];$filesize;"
|