Connecting Tech Pros Worldwide Forums | Help | Site Map

asp upload with width error message

Familiar Sight
 
Join Date: Jul 2006
Posts: 181
#1: Apr 7 '09
Hi, I think there isnt a way but just thought I would ask if anyone knew if there was a way to return an error if a image being uploaded exceeded a specified width. I am sure its possible if you save to a database but not to a folder on the server. Thanks if anyone knows.
Richard

jhardman's Avatar
Moderator
 
Join Date: Jan 2007
Location: logan, utah
Posts: 2,690
#2: Apr 9 '09

re: asp upload with width error message


Quote:

Originally Posted by fran7 View Post

Hi, I think there isnt a way but just thought I would ask if anyone knew if there was a way to return an error if a image being uploaded exceeded a specified width. I am sure its possible if you save to a database but not to a folder on the server. Thanks if anyone knows.
Richard

The only way I know of is to open the file as a binary stream and look for the size designation. I've only tried it with gifs, but the concept should work for all picture formats, you would just need to know where the size designation is on all of them.

Jared
Reply