Image filesize restriction

Author Message

David Eriksson

Thursday 21 July 2005 2:19:44 am

Currently, it seems that you can't restrict the filesize of images to less than one megabyte. When having thousands of users, having everyone upload a 1MB image isn't feasible. It would be good if this could be set to lower values.

Another argument for this: the loading time and bandwidth requirements of the forum if everyone has a 1MB avatar.

/David

Tian DK

Monday 01 August 2005 4:13:52 am

YES! I definately second this request. My next project is a Classified Ads site where people will be uploading images of the objects they wish to sell. Could take up a lot of space if everybody uploads a 1MB file.

It would be nice if the size of the images can be restricted in steps of 50k.

Can anybody knowlegable please comment?

Thanks for a great Opensource Project! :-)

Tian DK

Friday 05 August 2005 7:38:41 am

*BUMP*

Sorry to bump, but I think this would be a valuable addition to the functionality of eZpublish.

Could save a lot of disk space on the server.

eZ systems, is this maybe planned for any upcoming releases or as a hack/extension etc?

If not, any suggestions on where to look so I can attempt to hack it myself?

Thanks!

Xavier Dutoit

Friday 05 August 2005 8:05:36 am

You can't limit the uploaded file to less than 1Mb, however, you can shrink it to whatever dimension you want, so effectively limit the size too.

That solve the pb for the download of your avatars for your forums.

If you want to save space on the server, you can also replace the uploaded file by a size reduced one by changing some parameters on the image.ini.append.php, as opposed to generate an additionnal variation. We had a thread about it a while ago in the forum.

Beware that it works better with imagemagic than with GD (I had pb with gif files if I remember right).

X+

http://www.sydesy.com

Tian DK

Wednesday 17 August 2005 3:51:18 am

Thanks for the suggestions Xavier.

It's just that it makes more sense to have the limit to be set in "kb" in stead of "MB". Then it is easy to limit it on a more granular level.

Does anybody have any idea how to hack it so that the limit is based on kb rather than MB?

Thanks!

bisk

Tuesday 23 August 2005 9:24:15 am

Easiest way is setting the upload limit in a .htaccess file bypassing the ez publish config.

100K limit:

php_value upload_max_filesize 102400

or

LimitRequestBody 102400

Only problem is that it's a limit for all uploads and not for a certain class or user. So an ez publish config. option would still be nice.

-------------------------------
http://www.kookfijn.nl & http://www.magento.be

Tian DK

Wednesday 24 August 2005 7:37:44 am

Thanks for the suggestion Bisk. As you mention, it will be nice if it is configurable to not limit all uploads, but only specific ones.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.