Keyword

Limit item's image and attachment maximum size?

  • gerardo
  • gerardo's Avatar Topic Author
  • Visitor
13 years 3 months ago #97769 by gerardo
I want to limit the maximum size of the item's image and attachments to 500KB, so my K2 users can't upload files that are too bog. I tried doing that through Joomla's global configuration, but then I tested it and it didn't work.

 

What do I have to do to limit their maximum size?... thank you.

Please Log in or Create an account to join the conversation.

  • gerardo
  • gerardo's Avatar Topic Author
  • Visitor
13 years 3 months ago #97770 by gerardo
I would really appreciate someone helped me with this. And another related question: how can I also limit the type files that can be attached?

 

Thank you : )

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #97771 by shemul
anyone please ? help us

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #97772 by william white
Replied by william white on topic Limit item's image and attachment maximum size?
As far as i know, the file upload limit size is controlled by default with the php settings.

In php.ini it looks like this
upload_max_filesize = 10M

In your .htaccess file it can override the setting in php.ini and looks like this
php_value upload_max_filesize 10M

Changing it there would stop the large files, but would not be the "best solution" as the server would just refuse the file

See Kris's replyhere for the files that contain the file type restrictions...remember you are editing the core of k2

Please Log in or Create an account to join the conversation.

  • gerardo
  • gerardo's Avatar Topic Author
  • Visitor
13 years 3 months ago #97773 by gerardo
Thanks William. You're right, it's not the best solution but it'll do for now. I followed your two suggestions and I got them both to work. I REALLY appreciate your feedback, many questions in this forum are left unanswered and I know that the few people that help aren't enough for so many questions.

 

If you have the time I would also REALLY appreciate if you take a look at this two other questions. Making required fields (not extra fields) is my BIGGEST problem right now:

community.getk2.org/forum/topics/turning-fields-from?comment...

community.getk2.org/forum/topics/problems-making-item-form?c...

 

I don't know what to do : (

Please Log in or Create an account to join the conversation.

  • Salvatore de Mosticos
  • Salvatore de Mosticos's Avatar
  • Offline
  • New Member
More
11 years 1 month ago #97774 by Salvatore de Mosticos
Replied by Salvatore de Mosticos on topic Re: Limit item's image and attachment maximum size?
Is there any other, more stable and without messing with the code, way to make the upload limit for the registered members lower? And if there isn't can you explain, with what I am messing at? What these modifications, at the code, change exactly?

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum