Ok, nvm.. The reason it wasn't working was because of the..
System.Drawing.Image postedImage = System.Drawing.Image.FromStream(args.OpenStream());
I have changed the method to that below and everything seems to be working much better. I'm going to test this out with large files (120meg) and if it works.. $$ is on the way.
- protected void Uploader1_FileUploaded(object sender, CuteWebUI.UploaderEventArgs args)
- {
- string UploadedImageDir = Server.MapPath("UploadedImages/");
-
- string OrigFilename = args.FileName;
- string OrigExtention = OrigFilename.Substring(OrigFilename.Length - 4, 4);
-
- System.Guid newGUID = System.Guid.NewGuid();
-
-
- string GUIDFilename = newGUID.ToString() + OrigExtention;
- string PathAndFileToUploadedImagesDir = UploadedImageDir + GUIDFilename;
-
- args.MoveTo(UploadedImageDir + GUIDFilename);
-
- System.Drawing.Image postedImage = (System.Drawing.Bitmap)System.Drawing.Image.FromFile(UploadedImageDir + GUIDFilename);
-
- Session["ImageHeight"] = postedImage.Height.ToString();
- Session["ImageWidth"] = postedImage.Width.ToString();
- }