Could I get the total size of the file? - WeOnlyDo Discussion board

Could I get the total size of the file? (General questions)

by tim, Tuesday, September 15, 2009, 10:28 (5547 days ago)

when I use the ftpdlx uploading a file , could I get the total file size in the ftpserver? not the size I have uploaded .

thanks

Re: Could I get the total size of the file?

by woddrazen, Tuesday, September 15, 2009, 10:59 (5547 days ago) @ tim

Hi Tim,


If you want to retrieve size of file on remote server you can use wodFtpDLX GetSize Method.

Here is example how to use GetSize Method:
----------------------------------------------------
dlx1.GetSize /home/something/somefile.txt
----------------------------------------------------

You can then receive result in Attributes Event using Size variable. If you are using blocking mode you can receive it in ListItem Property.

More help for GetSize Method you can find here:
http://www.weonlydo.com/FtpDLX/Help/wodFtpDLXLib~wodFtpDLX~GetSize.html

Let us know how it goes.


Regards,
Drazen

Re: Could I get the total size of the file?

by tim, Wednesday, September 16, 2009, 05:43 (5546 days ago) @ woddrazen

thanks for your reply Drazen.

but I am sorry , I means how can server know the file size the client upload to him (the file have not been complete transfered).

(I need get the total file size in server not in client[:smile:])

thanks a lot

regards
tim

Re: Could I get the total size of the file?

by wodDamir, Wednesday, September 16, 2009, 09:08 (5546 days ago) @ tim

Tim,

Unfortunately, you can't. At least not until the file upload is done, since file size is not known to server before the actualy upload finishes.

You can only know how much bytes is uploaded so far (shown in Progress event).

Hope this helps.

Regards,
Damba

Re: Could I get the total size of the file?

by tim, Wednesday, September 16, 2009, 09:32 (5546 days ago) @ wodDamir

OK , thanks Damba .

then I will let the client send another message to server .

I like your component very much .

regards
Tim

Re: Could I get the total size of the file?

by wodDamir, Wednesday, September 16, 2009, 09:41 (5546 days ago) @ tim

Tim,

I'm glad that you like it.

If you run into any problems using it, let us know. We will try to assist in any possible way we can.

regards,
Damba