Clive,
Try using webDavResource.setPath("/slide/files/Test.txt")

I haven't seen the problem with the getContentLength that you are
talking about.  Make sure that your resource is pointing to a file, and
not at a collection.

Lance

-----Original Message-----
From: Clive Borrageiro [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 01, 2005 2:06 AM
To: Slide Users Mailing List
Subject: How to get file size for download

Hi,

I need to get the size of a file on the server for download so that I
can do
progress.
I tried 
        long fileSize = webDavResource.getContentLength();

But this returns '0'. I also tried setting the full path and relative
paths
        
webDavResource.setPath("http://localhost:8080/slide/files/Test.txt";);
        or webDavResource.setPath("/files/Test.txt");

And I get 'URIException: invalid port number' - but it is the correct
port
and
'HttpException' respectively.
How can I get the file size before downloading it.

Any help will be much appreciated!
Thanks.
Clive


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to