Good day, Joanne.

It's not possible to upload files to webserver by HTTP protocol using VFS.
Try use FTP (SFTP) or WebDAV protocols.


2007/7/19, Zhijuan Mao <[EMAIL PROTECTED]>:

Hi All:

I am having a new question regarding http in vfs. Basically I would
like to use vfs to upload a local file to a web server.

I seem to be able to resolve a file object when passing in a http
url.  eg.
String path = "";;
FileObject myFile = VFS.getManager().resolveFile(path);

But I cannot seem to do a copyFile for this File object eg:
myFile.copyFrom(localFileObject, Selectors.SELECT_ALL);

It always throws me the following exception:

Caused by: org.apache.commons.vfs.FileSystemException: Could not
create folder ""; because it already exists and
is a
       at org.apache.commons.vfs.provider.AbstractFileObject.createFolder(
       at org.apache.commons.vfs.provider.AbstractFileObject.createFolder(
       at com.dolby.nlps.agents.fileio.FileTransferAgent.process(
       ... 13 more

Can anyone please let me know what is wrong with it?

Thanks a lot!


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

Sergey Vladimirov

Reply via email to