-
- 82 Posts
Hello MODx Forum,
is it possible to set "max. Filesize" for Image-Upload in the template variable?
My wish:
The tv "my-images" with input-settings "Image" has max.Filesize 2mb. If i try te upload 3mb picture "mypicture.jpg", i get error "Max. Imagesize 2mb!"
best regards,
Joe.
-
- 128 Posts
There are a few things that will affect uploading. They are, server limits, account limits (custom php.ini), then modx. You'll likely need to update your server's max upload size, then verify that modx's setting is adequate.
I LOVE MODX! | greyskymedia.com
-
- 109 Posts
Just go to system setting and there, change the maximum upload size.
-
- 82 Posts
Thank you for the answers!
My problem is: i need the maximum-upload size for only one tv.
Example: i need my system settings upload size 6mb but the image TV most have 2mb.
-
- 24,544 Posts
I don't think that's possible. AFAIK, there's no System Event for uploading images for a TV. You might check to see if the OnBeforeFileManagerUpload System Event fires in that case, but I don't think it does. If it does, it might be possible to do it with a plugin, but even then, it might not work.
It would be a good feature request to add a size limit field for image TVs.
-
- 82 Posts
Thank you Bob,
i will try it later with "OnBeforeFileManagerUpload". If that works, i will tell you that of course.
-
- 118 Posts
Depending on your setup you could allow files larger than 2mb to be uploaded to the TV and have a plugin resize the image once it's on the server.
I published code to do this a while back, let me know if you need the link.
Not sure if you could it to an event specific to the tv in question. This would affect other uploads well. You can get past the resizer using FTP if you need to larger image files in some cases.
-
- 82 Posts
Hi Chris,
i think, that is what i need! Can you give me the link please?
-
- 82 Posts
@chris.dempsey78
Thank you for your plugin!
I will try to install this plugin and let you of course know, if it work!