Hello All ,

I uploaded the files with different sizes into slide store using slide console 
and also using slide api programmatically ...

But in brower , when I tried to view the contents .. 

files of smaller sizes are opening directly in the browser itself and for files 
of larger sizes a dialog box is raised to save the file insome location .. why 
is it like that ..

Please let me know .. How I can make all the files irrespective of sizes what 
to open in the browser itself without saving to disk ...

Thanks.,

Mahesh L.

===========

 

 

 

 

 

 



mahesh kumar <[EMAIL PROTECTED]> wrote: Hello Jason,

Its just a miracle .. my application started loading the file 
programmatically.. 

Thanks a ton .. 

Bye .,
MahesH L.
============
Jason McElravy wrote:
Try using

wdr.putMethod(wdr.getPath()+"/"+f.getName(),f);

You also might want to consider looking through the WebDAV client
javadocs.


-----Original Message-----
From: mahesh kumar [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 22, 2004 5:04 PM
To: Slide Users Mailing List
Subject: RE: PROBLEM IN uploading the file 


Jason ,



I am getting the following error after making the changes you have asked
for ..

C:\jakarta-slide-webdavclient-bin-2.1b2\bin>javac SlideClient.java
SlideClient.java:40: cannot resolve symbol
symbol : method getContents ()
location: class java.io.File

wdr.putMethod(wdr.getPath()+"/"+f.getName(),f.getContents());
^
1 error

the error is at f.getContents() hope this method is not availabkle with
api.



Thanks

Mahesh L.

============



Jason McElravy wrote: Use

wdr.putMethod(wdr.getPath()+"/"+f.getName(),
f.getContents());

Jason 


-----Original Message-----
From: mahesh kumar [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 22, 2004 4:46 PM
To: Slide Users Mailing List
Subject: RE: PROBLEM IN uploading the file 


Hello Jason,

I am getting the same error inspite of modifying the source code ..

The source code is ..

import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import org.apache.commons.httpclient.HttpException;
import org.apache.commons.httpclient.HttpURL;
import org.apache.webdav.lib.WebdavResource;

public class SlideClient {

public static void main (String args[]) 
{
try
{
System.out.println("\nCreateing HttpURL object");
HttpURL httpurl = new
HttpURL("http://localhost:8080/slide/files";);
System.out.println(" \n Setting the user info");
httpurl.setUserinfo("root","root");
System.out.println(" \n Creating the webdavResouce object ");
WebdavResource wdr = new WebdavResource(httpurl);
System.out.println("\n Creating file object ");
File f = new File ("myfile.txt");

// the file is in current directory where the program is running 

wdr.putMethod(f);
String
contents=wdr.getMethodDataAsString("/slide/files/maheshkumar.txt");
System.out.println("\nthe data is " + contents +"\n");
System.out.println("Put method is invoked ");
System.out.println("Put Method has worked ");
wdr.close();
}
catch(MalformedURLException mue)
{
}
catch(HttpException he)
{
}
catch(IOException ioe)
{
} 
}
}

Pls check the source code and let me know where I am going wrong..

Thanks

mahesh L.

============


Pls


Jason McElravy wrote: Check out this article.
Be sure to read the comments at the end. One
of them addresses your issue.

http://www.onjava.com/pub/a/onjava/2003/12/23/slide.html

Jason 

-----Original Message-----
From: mahesh kumar [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 22, 2004 4:09 PM
To: [EMAIL PROTECTED]
Subject: Fwd: PROBLEM IN uploading the file 


Hello Everybody ,
I am getting the following error while I am trying to upload the file
programmatically using slide api 
The source code is as follows ..
import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import org.apache.commons.httpclient.HttpException;
import org.apache.commons.httpclient.HttpURL;
import org.apache.webdav.lib.WebdavResource;
public class SlideClient {
public static void main (String args[]) 
{
try
{
System.out.println("\nCreateing HttpURL object");
HttpURL httpurl = new
HttpURL("http://localhost:8080/slide/files";);
System.out.println(" \n Setting the user info");
httpurl.setUserinfo("root","root");
System.out.println(" \n Creating the webdavResouce object ");
WebdavResource wdr = new WebdavResource(httpurl);
System.out.println("\n Creating file object ");
boolean success=wdr.putMethod("/slide/files/myfile.txt");
System.out.println("\nthe value of boolean is " +success);
String
contents=wdr.getMethodDataAsString("/slide/files/maheshkumar.txt");
System.out.println("\nthe data is " + contents +"\n");
System.out.println("Put method is invoked ");
System.out.println("Put Method has worked ");
wdr.close();
}
catch(MalformedURLException mue)
{
}
catch(HttpException he)
{
}
catch(IOException ioe)
{
} 
}
}
The error is 
http-8080-Processor25, 22-Nov-2004 16:04:48, root, PROPFIND, 207
"Multi-Status", 550 ms, /files
http-8080-Processor25, 22-Nov-2004 16:04:48, root, PUT, 403 "Forbidden",
1251 ms, /files
http-8080-Processor25, 22-Nov-2004 16:04:50, root, GET, 200 "OK", 300
ms, /files/maheshkumar.txt


Your response is highly appreciated ....

Thanks
mahesh L.
==========

Note: forwarded message attached.


trimony/> Yahoo! India Matrimony: Find your life partner online
atrimony/> .


Yahoo! India Matrimony: Find your life partneronline.


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



Yahoo! India Matrimony: Find your life partneronline.


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


Yahoo! India Matrimony: Find your life partneronline.

Yahoo! India Matrimony: Find your life partneronline.

Reply via email to