Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add config-option for an image's maximum filesize when generating previews #13449

Merged
merged 1 commit into from
Jan 22, 2015

Conversation

georgehrke
Copy link
Contributor

fixes #13218

@MorrisJobke
Copy link
Contributor

works 👍

* Default is 50
* Set to -1 for no limit
*/
'max_filesize_imagegd_previews' => 50,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

@@ -944,6 +944,17 @@
'forwarded_for_headers' => array('HTTP_X_FORWARDED', 'HTTP_FORWARDED_FOR'),

/**
* max file size for generating image previews with imagegd (default behaviour)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@carlaschroder please review this documentation -THX

@ghost
Copy link

ghost commented Jan 19, 2015

Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/7252/
🚀 Test PASSed. 🚀

@carlaschroder
Copy link

👍

@MorrisJobke
Copy link
Contributor

@oparoz @wakeup @Sugaroverdose An easy to review PR ;) Simply use a big image ( https://commons.wikimedia.org/wiki/File:Bath_from_alexandra_park.jpg ) and test if it doesn't has a preview while smaller images still have previews. ;)

@oparoz
Copy link
Contributor

oparoz commented Jan 21, 2015

My problem is that it doesn't really fix #13218

I'd like this line to be fixed as part of the overall solution: https://github.com/owncloud/core/blob/master/lib/private/image.php#L470

And I'd like for these defaults to be modified to something reasonable like 2048x2048 so that we can start to generate sane previews for a browser/mobile environment.
https://github.com/owncloud/core/blob/master/config/config.sample.php#L611
https://github.com/owncloud/core/blob/master/config/config.sample.php#L616

* Default is 50
* Set to -1 for no limit
*/
'max_filesize_image_previews' => 50,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realized that we have other preview related settings - please move this one to the others and name accordingly

preview_max_filesize_image

Sorry for the late notice

@DeepDiver1975
Copy link
Member

@oparoz we discussed already that fixing OC_Image is too critical for the current dev cycle - we can touch this class for OC8.1. This PR is a workaround for OC8

@oparoz
Copy link
Contributor

oparoz commented Jan 21, 2015

@DeepDiver1975 Line 470 is a logging operation which kills PHP. Surely this can be removed in OC8 or simplified to just output a simple string?

The other settings I've mentioned have values of null, which make as much sense as having no limit on filesize imho.

@DeepDiver1975
Copy link
Member

@DeepDiver1975 Line 470 is a logging operation which kills PHP. Surely this can be removed in OC8 or simplified to just output a simple string?

Ah - I see what you mean now - sorry - I was on a different track .... 🙈

It's indeed pointless to write the blob content to the log here : facepalm:

@georgehrke please submit a second pr where this log line is simply killed

@oparoz feel free to submit this pr as well if you are interested - THX

@oparoz oparoz mentioned this pull request Jan 22, 2015
11 tasks
@georgehrke
Copy link
Contributor Author

@georgehrke please submit a second pr where this log line is simply killed

#13614

@scrutinizer-notifier
Copy link

The inspection completed: 4 new issues

@ghost
Copy link

ghost commented Jan 22, 2015

Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/7749/
🚀 Test PASSed. 🚀

@DeepDiver1975
Copy link
Member

👍

DeepDiver1975 added a commit that referenced this pull request Jan 22, 2015
add config-option for an image's maximum filesize when generating previews
@DeepDiver1975 DeepDiver1975 merged commit 5776bfe into master Jan 22, 2015
@DeepDiver1975 DeepDiver1975 deleted the image_preview_limit branch January 22, 2015 22:02
@DeepDiver1975
Copy link
Member

@karlitschek backport? Was reported as issue on oc7

@karlitschek
Copy link
Contributor

backport would be good

@MorrisJobke
Copy link
Contributor

stable7 2d2e024 - tested works

@lock lock bot locked as resolved and limited conversation to collaborators Aug 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[6.0.6] Thumbnails of 140MB photo files result in a timeout error of the WebGUI
7 participants