Web Client (Upload)

C

csharpula csharp

Hello ,
I would like to ask a question related to C# WebClient.
I am trying to upload a file using this code:

webClient.UploadFile(httpPath, "PUT", filePath);

The thing is that I want to upload on UNIX server and the question is
how can I provide httpPath on UNIX? How can I create "virtual directory"
on UNIX for this?

Thank you very much!
 
A

Arne Vajhøj

csharpula said:
I would like to ask a question related to C# WebClient.
I am trying to upload a file using this code:

webClient.UploadFile(httpPath, "PUT", filePath);

The thing is that I want to upload on UNIX server and the question is
how can I provide httpPath on UNIX? How can I create "virtual directory"
on UNIX for this?

First question: does your Unix HTTP server support PUT ? (not all do)

Usually on Unix you add mappings from URL to file system in the
HTTP servers config file.

Arne
 
C

csharpula csharp

But I want to add another option to map a drive or to upload a file by
sending http url with the location on the server. The question is how
can I do that?
For example for IIS I send as parameter to Upload:
http://localhost/NewDir/data.zip ,what should I send in UNIX instead?

Thank you!
 
A

Arne Vajhøj

csharpula said:
But I want to add another option to map a drive or to upload a file by
sending http url with the location on the server. The question is how
can I do that?
For example for IIS I send as parameter to Upload:
http://localhost/NewDir/data.zip ,what should I send in UNIX instead?

There is nothing IIS specific in that.

If your Apache is configured to do PUT then /NewDirdata.zip
should show up wherever the config mapping from URL to
dir say it should.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top