View Full Version : Image upload - possible to compress before uploading?

11-07-2007, 01:40 PM
Hi there,

I'm brand new to ASP (from PHP background) and i am developing some content management for a web site. I'm having a problem with the fact that I want to allow image files to be uploaded to a remote web server, as the hosting package the web site is on is IIS6 and has a default file upload size limit of 200kb. As it's a shared hosting package, the default limit cannot be changed for me, therefore I'm stuck with the problem of how to compress image files prior to uploading. I'm using a pure ASP file upload script which is working fine, apart from the size issue.

Ideally, I'd like to avoid having to ask my client to resize and compress images they wish to upload to the site, therefore if anyone has any ideas that would be much appreciated.

11-07-2007, 02:22 PM
I can't think of anything that wouldn't involve you installing additional components on the server, which I assume your hosting package doesn't permit? If you can, then I believe you might be able to automate some image optimisation using Imagemagick (http://en.wikipedia.org/wiki/ImageMagick).

Whatever Jr.
11-07-2007, 02:35 PM
Convince your client to host his/hers website on an apache server.

You're a php-coder, compressing images in php is a breeze, no crappy 200Kb upload limit, or missing components.

Why was an ASP solution even considered?


11-07-2007, 02:44 PM
tell me about it, the php scripting with GD is really straightforward. alas the site already has a number of existing ASP files, so they want to stay on a .NET platform. i'd always use a LAMP solution whenever possible, but here I am fumbling around with ASP - having said that, it's been fine apart from the file upload issue. i suppose it's not the end of the world if i ask them to resize images before uploading....

Whatever Jr.
11-08-2007, 09:21 AM
Asking the client to resize is an option, but it's just a matter of time before they forget that and you'll get a panicy e-mail about the giant wallpaper they uploaded and want resized NOW.

Other options:
-install a component to handle the resizing.
- Upload to another server to handle the resizing

HTH, Tom