pcjunky
asked on
Problem Uploading files with Webclient.uploadfile()
I'm trying to write a program to allow a user to select a file(in particular image files) and upload it to a remote server. Currently I'm to use the webclient uploadfile method. If I use it with the "POST" verb I get a eror from the server: method not allowed. I've tried the "PUT" verb as suggested by another question here at experts=exchange. The file gets uploaded, but can no longer be opened, there are errors in the file. I tried a textfile as well, it could be opened but there was added text. Any help is as always appreciated. I'm also not set in stone using uploadfile so if you have another way of uploading the files I'm willing to try them. Thanks in advance.
~pcjunky
~pcjunky
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
oh sorry
I forgot to remove the codes
"settings.writetolog()... Which is simple a log written to a file...."
"the functions takes an arguament as progressbar and show the download status also...
I forgot to remove the codes
"settings.writetolog()... Which is simple a log written to a file...."
"the functions takes an arguament as progressbar and show the download status also...
can u say what is type of file u uploaded ( gir or jpg)....
regards
prakash
regards
prakash
ASKER
It's a jpg in both cases. I tested it with the sample pictures that come with Windows (winter, sunset, etc). The sunset.jpg works fine, but winter.jpg opens like I said.
~pcjunky
~pcjunky
While you try to view that file in the browser, the image is not shown instead of that it opens fax or picture viewer !!!!
Is the Image shwon in pictureviewer??
regards
prakash
Is the Image shwon in pictureviewer??
regards
prakash
ASKER
Yes when I try to navigate to the picture with the web browser control in my program it opens picture viewer instead of navigating to it. The image is shown in picture viewer.
~pcjunky
~pcjunky
Hello Prakash, this post looks to be what I'm looking for. ...plus is looks like it has some excellent features like tracking progress. I'm trying to upload a local file to a hosted server without user intervention.
I'm a newbie trying to figure out the above code. I'm using Web Matrix and VB.
In the above code how would I load the source location, destination location, source filename and destination filename ?
I'm a newbie trying to figure out the above code. I'm using Web Matrix and VB.
In the above code how would I load the source location, destination location, source filename and destination filename ?
ASKER
Thanks again.
~pcjunky