Verify image dimensions on upload!
using System.Drawing;
Stream inputStream = httpContext.Request.Files[0].InputStream;
using(Image img = Image.FromStream(inputStream))
{
if( img.Width < 640 && img.Height < 480)
{
throw new Exception("your error message");
}
}
Written by Ion D. Filho
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#.net
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#