Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C#: Upload all files in a directory

Status
Not open for further replies.

ChainsawJoe

Programmer
Dec 5, 2000
154
0
0
GB
Can anyone point me to a resource which can help me with this little issue I'm working with: I've written a pretty funky online photo album doohickey but at the mo you can only select one file at a time to upload (as in, you have to browse and select one, then browse and select another etc, then hit a "submit" button). I want the user to be able to select a directory on their pc and upload all pictures in it. I've written a simple windows application using the luverly FolderBrowserDialog, but now I don't know how to have that communicate with the web-based section. Do I need to utilise RPC or the like? If so, how could I do that? Basically, all I'd need is to have the windows app call a single webpage to upload each image at a time and pass some authentication info as well. Kinda like posting some form fields and a form file field.

Any ideas?

Help would be muchos appreciated!

--------------------------------------------------
- better than toast.
Penguins - better than --------------------------------------------------
 
A better solution if you're using a windows forms app is to look into using a webservice to communicate between your app and your service. It'd make things simpler, handle whatever load you need, and do authentication.

Other than that, you could probably look into using a hidden webbrowser control and just post from that in a loop using a regular file upload.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top