Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Disabling the maximum pixel restrictions for upload  (Read 264 times)

0 Members and 1 Guest are viewing this topic.

eberproducts

  • Coppermine newbie
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 9
Disabling the maximum pixel restrictions for upload
« on: May 18, 2019, 12:31:49 pm »

Hi everyone,
is there a possibility to "disable" the pixel restrictions for upload ?
For "normal" pictures this restrictions may be fine, but I have quite a lot "panorama" pictures, they exceed the maximum of 10.000 pixel. Most of my panos have 15.000 or 20.000 pixel.
So my problem is
a.) I neither can upload any of my panos nor I can insert it into any album even if I upload it via FTP.
b.) I don't want to resize the panos by or for uploading, so I will loose the original file. (An why should I store the original panos on a second place if I need them sometimes for other purposes with the original high resolution)

A good way would be, to "manually override" the limitation on demand e.g. at the upload process ..."QUESTION: Are you sure, you want to upload..."  so the original file will be uploaded, stored in the folder (for further use and downloads) and a second reduced version of the file will be created that meets the optimized size for displaying it in a good way.
Or let the "Maximum Pixel" field set to "0" to disable the pixel size check at all.

Thanks!
Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 1258
Re: Disabling the maximum pixel restrictions for upload
« Reply #1 on: May 18, 2019, 01:54:38 pm »

That 10000 pixel limit is not actually a logical limit. It is just set in the UI field display as part of what was thought would be a reasonable range. Make the change below and you will be able to input a larger value.

In the file include/admin.inc.php, at about line 981, change:
Code: [Select]
    'picture_width' => array(
      'type'            => 'textfield',
      'min'             => '0',
      'max'             => '10000',
      'default_value'   => '400',
to:
Code: [Select]
    'picture_width' => array(
      'type'            => 'textfield',
      'min'             => '0',
//    'max'             => '10000',
      'default_value'   => '400',

i.e. comment out the max value
Logged

eberproducts

  • Coppermine newbie
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 9
Re: Disabling the maximum pixel restrictions for upload
« Reply #2 on: May 18, 2019, 02:34:18 pm »

I changed the value to 99.999, but within the UI I'm still not able to rise the value higher than 10.000
Are there any further .php files I have to edit ?

At least I could insert the pano now via FTP upload - but for the processing I had to increase the PHP memory_limit to 256MB  :D
Logged

eberproducts

  • Coppermine newbie
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 9
Re: Disabling the maximum pixel restrictions for upload
« Reply #3 on: May 18, 2019, 02:40:33 pm »

got it - it was I bit more down at line 1007...

'max_upl_width_height' => array(
      'type'            => 'textfield',
      'min'             => '0',
      'max'             => '99999',
      'default_value'   => '2048',

I changed this value also to 99.999 - now everything works fine.

Thanks for the really quick help!! - You can close this topic now as "solved"
Logged
Pages: [1]   Go Up
 

Page created in 0.028 seconds with 20 queries.