Byte[] bytes = fileUpload1.FileBytes;
MemoryStream m = new MemoryStream(bytes);
System.Drawing.Image MyImage = System.Drawing.Image.FromStream(m);
string filepathandname = Server.MapPath(string.Format("~/uploads/{0}-{1}-{2}", DateTime.Now.ToShortDateString(), Guid.NewGuid(), ".png"));
MyImage.Save(filepathandname);
No comments:
Post a Comment