Ask coding questions

← Back to all posts
Download images to a folder using code
reteshgondal (5)

Can I download images from a url via my code and save it in a folder inside repl.it

Comments
hotnewtop
reteshgondal (5)

public class downloadImages{

public void download(string[] args){
using (WebClient client = new WebClient())
{
client.DownloadFile(new Uri("someimage.JPG"), "/images/someimage.jpg");
}

    }

}

reteshgondal (5)

csharp

i want to download images from a URL. testing my code but getting some authentication error

ArchieMaclean (926)

@reteshgondal I'm sorry, I don't know any c sharp.
Hopefully someone else can help you. Good luck!

ArchieMaclean (926)

What language are you wanting to use?