Skip to content
← Back to Community
Download images to a folder using code
Profile icon
reteshgondal

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

Voters
Profile icon
Alessia4839
Profile icon
MelisaPunjani
Profile icon
cormanm
Profile icon
reteshgondal
Comments
hotnewtop
Profile icon
reteshgondal

public class downloadImages{

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

}

}

Profile icon
reteshgondal

csharp

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

Profile icon
ArchieMaclean

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

Profile icon
ArchieMaclean

What language are you wanting to use?