Image management - limit file size
3 posts
• Page 1 of 1
Image management - limit file sizeCan the upload file size of product_image be limited. I had some users that were not following my advice about optimizing images and were uploading files in excess of 3mb. I would like to force them to comply.
In the tables/products/fields.ini file find the section pertaining to the product_image field:
Add the maxfilesize validator to this section. E.g.:
This would limit the upload size to 32k (i.e. the size is specified in bytes). The user would then get an error message saying that the product_image field had illegal input. You may want to provide your own custom error message for this case to make it more clear that the problem was that the file was too big. In this case you could add:
So when you're done, the product_image section might look something like:
On some of my sites I have integrated an image server script to automatically shrink images to avoid this problem... but I'll save that for another post. Best regards Steve
3 posts
• Page 1 of 1
Return to Web Auction Discussion Who is onlineUsers browsing this forum: No registered users and 31 guests |