电子 电子 <[EMAIL PROTECTED]> writes:

> I am trying to upload the file with the following approach:
> --------------------------------------------------------------------------------------
> HttpURL url = new HttpsURL("user", "user", "localhost", 8000,
>                                userUri, null);
>  WebdavResource resource = new WebdavResource(url.toString());
> boolean ret = resource.putMethod(URLEncoder.encode("myproject" + "/" +
>                 file.getFileName()), file.getInputStream());
> --------------------------------------------------------------------------------------
>  
> the putMethod returned true, but the file is not uploaded and no record is added 
> into the database. Am I using the correct approach or there is a better way? 

It looks correct, but URLEncoder.encode("myproject/filename") does probably not what 
you expect.
It will encode the / to, so the result is 'myproject%2Ffilename'.

Martin



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

Reply via email to