|go ahead... be a heretic|
Re: Upload with image resizing by Image::Magickby andye (Curate)
|on Jan 21, 2009 at 11:58 UTC||Need Help??|
The way I've done it in the past:
- receive the file upload using CGI.pm or Apache::Whatever
- save it (making sure the filename is untainted)
- ask image magick if the file is an image of one of the types you're willing to accept (delete it if not)
- run image magick's resizing thingy as a system call. let the web server return a page to the user, while leaving IM to get on with things (because it can take a while for big files).
Also, be aware that image magick resizing can use a lot of memory for large files. so you might want to restrict the size of the file upload.