Hello
(google translate is my friend)
I noticed a small anomaly in the uploaded images. Indeed, the maximum size of the images is not taken into account when uploading images.
I set the limit to 1 MB does not have images of more than 1 Mega octed.
I could upload (as a member) without a problem image 1.7 MB
Note that I have enabled the module plupload.
How to take into account this limit?
I marked that it is a bug but I'm not sure this is the case.
Bonjour
J'ai remarqué une petite anomalie au niveau des images uploadés. En effet le poids maximal des images n'est pas pris en compte lors de l'upload des images.
J'ai fixé comme limite 1 MB pour ne pas avoir des images de plus de 1 Méga-octed.
J'ai pu uploader (en tant que membre) sans problème une image de 1,7 Mo.
Je précise que j'ai activé le module plupload.
Comment prendre en compte cette limite ?
J'ai marqué que c'est un bug mais je ne suis pas sur que ce soit le cas.
Comment | File | Size | Author |
---|---|---|---|
#18 | scald-use_field_thumbnail_settings-2068267-18.patch | 3.02 KB | nagy.balint |
#14 | Bildschirmfoto 2014-04-09 um 17.52.35.png | 31.05 KB | shortspoken |
Comments
Comment #1
jcisio CreditAttribution: jcisio commentedThe point here is you may want to limit the thumbnail field to something like 50 KB 100x100 pixel so that you don't have big thumbnails, but still keep the original images in Scald Image. And if Scald Image is the only image provider, then it'd be great to have an option to respect the field file size limit.
Comment #2
A-snowboard CreditAttribution: A-snowboard commentedHello,
I do not mean the weight of the sticker, but the original weight of the image file.
A member can upload an image of 40 MB if desired.
Now I want to limit an image to 1MB
In the manager scald image fields I "Maximum Upload Size"
I put 1MB, it is obviously not taken into account because I can upload pictures heavier.
Comment #3
jcisio CreditAttribution: jcisio commentedIn the Scald Image provider, both image and thumbnail are the same file.
Comment #4
A-snowboard CreditAttribution: A-snowboard commentedok, thank you for accuracy.
but how can I do to reduce the weight of the picture? I have set the limit, but this is not taken into account.
Comment #5
jcisio CreditAttribution: jcisio commentedThis is a feature request, so you can't do it yet, unless you code with hook_entity_presave() for example to resize the uploaded image.
Comment #6
gifad CreditAttribution: gifad commentedThe attached patch does the job for plupload upload method;
(cf sites/all/modules/plupload/README.txt)
set status to needs work, as this should be done for "normal" file upload also (and I could not make it);
but this can be a convenient workaround for A-snowboard ;)
Comment #7
gifad CreditAttribution: gifad commentedupdated for latest (7.x-1.1+19) dev release...
Comment #8
A-snowboard CreditAttribution: A-snowboard commentedThank you for your patch
I'll test it and you tennir aware.
By cons I do not have the same code as I 7.x-1.1 release
I tested as I can and come back.
Comment #9
A-snowboard CreditAttribution: A-snowboard commentedThe code asks me trouble with my version of scald.
I send you this evening my error and the screen messages.
Comment #10
jcisio CreditAttribution: jcisio commentedSince it is a feature request, and there are use cases to bypass the field limit settings, I think Scald Image should have options to:
- Respect the field filesize limit settings: a checkbox.
- Or to specify an independant maximum image size.
Comment #11
A-snowboard CreditAttribution: A-snowboard commentedHello,
Complettement I forgot to put the mistakes that I had with the patch.
(I really do not have time with the academic year)
I do that whenever I can.
In my opinion, if it is an addition of functionality, you just can limit the maximum input size.
Comment #12
Raphael Apard CreditAttribution: Raphael Apard commentedhi,
Here a patch to force scald_image to "Respect the field settings". I'm pretty sure than the 2 functions "getFieldUploadValidators" and "getFieldDescription" don't have to be in ScaldAtomController. Just put them here becasuse of "getThumbnailPath".
jcisio, what the point of having a checkbox to "Respect the field filesize limit settings". Each scald type have his own instance of thumbnail field no ?
Comment #13
Simon Georges CreditAttribution: Simon Georges commentedChanging the status back to "Needs review", as there is a new patch.
Comment #14
shortspoken CreditAttribution: shortspoken commentedThanks @Raphael Apard for the patch. It works as expected but the description is printed twice. See attached screenshot.
Comment #15
jcisio CreditAttribution: jcisio commentedNW because of #14.
Comment #16
A-snowboard CreditAttribution: A-snowboard commentedHello,
(sorry google translate is my friend)
I tried to apply the patch #12, I am entitled to the white screen of death!
May be a problem with the code for the file: ScaldAtomController.inc?
Here is my current code:
Comment #17
al.ex CreditAttribution: al.ex commentedHello,
I re-created the patch against the latest dev version (commit 665de6d).
Comment #18
nagy.balint CreditAttribution: nagy.balint commentedGeneralized the functions a little bit, and fixed the issue in #14.
Rerolled the patch for latest dev.
Comment #20
nagy.balint CreditAttribution: nagy.balint commentedThanks! Committed.