LycheeOrg / Lychee

A great looking and easy-to-use photo-management-system you can run on your server, to manage and share photos.
https://lycheeorg.github.io/
MIT License
3.35k stars 299 forks source link

The upload_processing_limit parameter only works when uploading images in the admin account. It does not work for images uploaded by other users #1127

Closed mateusz-holysz closed 2 years ago

mateusz-holysz commented 2 years ago

Detailed description of the problem [REQUIRED]

The upload_processing_limit parameter only works when uploading images in the administrator account. It does not work for images uploaded by other users.

Steps to reproduce the issue

Steps to reproduce the behavior:

  1. As Administrator go to 'Settings';
  2. Scroll down to 'More' and click on it;
  3. Set upload_processing_limit to '1'
  4. Log out from admin account;
  5. Log in as other user;
  6. Try uploading some photos;
  7. Four photos are processed simultaneously without respecting the parameter upload_processing_limit set to '1'.
  8. Log out from user account;
  9. Log in as admin;
  10. Try uploading some photos;
  11. Photos are processed one by one;
  12. When two or more photos are processed simultaneously on RPi4b only part of the photos are processed. Most of them not.

Screenshots Admin lychee Admin lychee-1 User lychee-2

Output of the diagnostics [REQUIRED]

Diagnostics
-------
Warning: Dropbox import not working. dropbox_key is empty.
Warning: You may experience problems when uploading a photo of large size. Take a look in the FAQ for details.
Info: Latest version of PHP is 8
Warning: Using 32 bit PHP, recommended upgrade to 64 bit

System Information
--------------
Lychee Version (release):        4.3.4
DB Version:                      4.3.4

composer install:                --no-dev
APP_ENV:                         production
APP_DEBUG:                       false

System:                          Linux
PHP Version:                     7.4
Max uploaded file size:          20M
Max post size:                   200M
MySQL Version:                   10.5.12-MariaDB-log

Imagick:                         1
Imagick Active:                  1
Imagick Version:                 1803
GD Version:                      bundled (2.1.0 compatible)

Config Information
--------------
version:                         040304
check_for_updates:               0
sorting_Photos_col:              taken_at
sorting_Photos_order:            ASC
sorting_Albums_col:              max_taken_at
sorting_Albums_order:            ASC
imagick:                         1
skip_duplicates:                 0
small_max_width:                 0
small_max_height:                360
medium_max_width:                1920
medium_max_height:               1080
lang:                            en
layout:                          1
image_overlay_type:              desc
default_license:                 reserved
compression_quality:             90
full_photo:                      1
delete_imported:                 0
Mod_Frame:                       1
Mod_Frame_refresh:               30
thumb_2x:                        1
small_2x:                        1
medium_2x:                       1
landing_page_enable:             0
landing_owner:                   A. M. Sz. A. G. Hołyszowie
landing_title:                   John Smith
landing_subtitle:                Cats, Dogs & Humans Photography
landing_facebook:                https://www.facebook.com/JohnSmith
landing_flickr:                  https://www.flickr.com/JohnSmith
landing_twitter:                 https://www.twitter.com/JohnSmith
landing_instagram:               https://instagram.com/JohnSmith
landing_youtube:                 https://www.youtube.com/JohnSmith
landing_background:              dist/cat.jpg
site_title:                      Lychee v4
site_copyright_enable:           0
site_copyright_begin:            2019
site_copyright_end:              2019
additional_footer_text:          
display_social_in_gallery:       0
public_search:                   0
SL_enable:                       0
SL_for_admin:                    0
public_recent:                   0
recent_age:                      1
public_starred:                  0
downloadable:                    0
photos_wraparound:               1
map_display:                     0
zip64:                           1
map_display_public:              0
map_provider:                    Wikimedia
force_32bit_ids:                 0
map_include_subalbums:           0
update_check_every_days:         3
has_exiftool:                    1
share_button_visible:            0
import_via_symlink:              0
has_ffmpeg:                      1
location_decoding:               0
location_decoding_timeout:       30
location_show:                   1
location_show_public:            0
rss_enable:                      0
rss_recent_days:                 7
rss_max_items:                   100
prefer_available_xmp_metadata:   0
editor_enabled:                  1
lossless_optimization:           0
swipe_tolerance_x:               150
swipe_tolerance_y:               250
local_takestamp_video_formats:   .avi|.mov
log_max_num_line:                1000
unlock_password_photos_with_url_param: 0
nsfw_visible:                    1
nsfw_blur:                       0
nsfw_warning:                    0
nsfw_warning_admin:              0
map_display_direction:           1
album_subtitle_type:             oldstyle
upload_processing_limit:         1
public_photos_hidden:            1*

Browser and system

Firefox ESR Debian 10, Chrome, Vanadium Android,

kamil4 commented 2 years ago

Huh... This is... surprising :confused:. It looks like the propagation of config variables from the server to the front end is not working the way I thought it did...

If you have an edit access to the database, you should be able to work it around at least temporarily. In Lychee's configs table, look up the record with the key equal to upload_processing_limit and set the value of its confidentiality column to 0 (it should currently be 2).

mateusz-holysz commented 2 years ago

Workaround works fine. Thank You for a rapid response :).