I'm using .Net.
Is it possible for a web form to upload an image from a web or FTP server? The files I need to submit are on the web. If this is possible, code snippet is appreciated.
I'm using .Net.
Is it possible for a web form to upload an image from a web or FTP server? The files I need to submit are on the web. If this is possible, code snippet is appreciated.
Yes, it is possible.
You can use the WebClient class to interact with other web servers in .Net server-side code.
For example:
using(var client = new WebClient())
client.UploadFile("ftp://server/path", @"C:\path\to\file");
If the file is on a different website, you can write the following:
using(var client = new WebClient())
client.UploadData("ftp://server/path", client.DownloadData("http://server/path"));
You can read and write FTP, HTTP, and HTTPS urls interchangeably.