panse vaishali

panse vaishali

  • NA
  • 204
  • 24.1k

Generic Error Occurred in GDI

Dec 6 2016 7:32 AM
Hi,
 
I am facing issue Generic Error Occured in GDI while uploading images to server ,i am using azure portal.
My code is as follows:
[05:58:42 PM]
 
string directoryPath = @"~\PostImage\";
Image image = Image.FromStream(postedFile.InputStream);
string Filepath = Server.MapPath(directoryPath);
string Filename = Filepath + "PostImageFile.jpg";
result.FieldName = Filename;
image.Save(Filename, ImageFormat.Jpeg);
 
Please suggest a solution for above error.
 
Thanks and regards
Prachi Kulkarni 

Answers (2)