Progress - total is 0? - WeOnlyDo Discussion board

Progress - total is 0? (General questions)

by Morten Larsen, Thursday, March 16, 2006, 18:30 (6830 days ago)

When I'm using the Progress event, the total parameter is allways 0. The position parameter counts up nicely though...

Am I doing something wrong (maybe with the way I connect/send files to the server), or is it some sort of a bug in the server?


/Morten

Re: Progress - total is 0?

by Morten Larsen, Thursday, March 16, 2006, 18:40 (6830 days ago) @ Morten Larsen

Never mind... I just thought I could use the event to see if an uploaded file was complete . I was looking for some way to delete uploaded files, that broke down during transfer, so that I don't have any corrupted files on the server.

Is there any other way to do that?

And also - is it possible somehow to shut down the server, so that no more incoming connections are allowed, but the current filetransfers will be allowed to complete?

Re: Progress - total is 0?

by wodSupport, Thursday, March 16, 2006, 19:18 (6830 days ago) @ Morten Larsen

No, this is not a bug. During file upload, file size is not known, so wodFTPServer puts 0 there.

Kreso

Re: Progress - total is 0?

by wodDrazen, Thursday, March 16, 2006, 23:58 (6830 days ago) @ wodSupport

Hi Morten,

You can try to delete file under TransferCompleted Event.
There you can find Successful Variable and you can use it in your case if transfer isn't completed(Successful = False).

Also, you can try with Successful Variable under TransferCompleted Event for shutting down server after file transfer.
In this case if transfer is completed successfully you can call Stop Method and to deny users to connect to your server in that time you can try with something like this under Connecting Event:

If User.RemoteIP <> current_user_ip Then Action = Deny


Hope I helped.

Regards,
Drazen