Jump to content
Дизайн и модификация IPS Community IPBSkinsBETA
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
alcatras

Ограниченное количество картинок в загрузках (файлах)

Recommended Posts

Можно ли как то ограничить количество загружаемых картинок в файлах (загрузках)? Как загружаемых, так и по url.

Share this post


Link to post
Share on other sites

По url

\applications\downloads\sources\Form\LinkedScreenshots.php

Найти

			foreach( $this->formatValue() as $value )

Выше добавить

			if (\count($this->value) > 5)
		{
			throw new \DomainException( \IPS\Member::loggedIn()->language()->addToStack( 'form_items_max', FALSE, array( 'pluralize' => array( 5 ) ) ) );
		}

 

 

Для загружаемых

\applications\downloads\modules\front\downloads\view.php

\applications\downloads\modules\front\downloads\submit.php

Найти

'storageExtension'	=> 'downloads_Screenshots',

Ниже добавить

'maxFiles' => 5,

5 - макс. кол-во файлов

  • Upvote 2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...