With custom .net forms i normally create media by use of upload fields and Media.MakeNew. This time i'm trying to save an image with a set url like "http://www.domain.com/sample.gif". Hoe can i best go about doing this?
Succeeded in doing this by using following code (System.Web.Helpers namespace required):
var request = (HttpWebRequest)WebRequest.Create(imageUrl); var response = (HttpWebResponse)request.GetResponse(); WebImage image = new WebImage(response.GetResponseStream()); image.Save(fullFilePath, extension);
Saving media from url instead of FileUpload
Hi guys,
With custom .net forms i normally create media by use of upload fields and Media.MakeNew. This time i'm trying to save an image with a set url like "http://www.domain.com/sample.gif". Hoe can i best go about doing this?
Kind regards,
Harm-Jan
Succeeded in doing this by using following code (System.Web.Helpers namespace required):
is working on a reply...