Size upload image

Author Message

Jonathan Clavier

Wednesday 27 April 2011 2:39:12 am

Hi,

I would like to reduce the size of upload images backend (<1 MB).
Someone has an idea?

Heath

Wednesday 27 April 2011 6:09:07 am

Hello,

Try editing the file content class in the admin.

It has a file attribute which provides the ability to set an uploaded file size limit.

re: /class/view/28

Cheers,

Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Xavier Serna

Wednesday 27 April 2011 6:34:51 am

Every "ezimage" attribute has a "Max Size" value that can be set. Also, necessary adjustements in PHP configuration should be done (more info http://www.radinks.com/upload/config.php)

regards.

--
Xavier Serna
eZ Publish Certified Developer
Departament de Software
Microblau S.L. - http://www.microblau.net
+34 937 466 205

Jonathan Clavier

Wednesday 27 April 2011 7:26:57 am

Thank you Heath, but with this method, I can not specify a size less than 1MB.
Xavier, with your method, I must specify the size of all files to upload.
I try to limit the size according to the chosen class and not for all.

This should be possible I think.

Heath

Wednesday 27 April 2011 10:01:14 am

Hello Jonathan,

Then I would suggest creating a customized (as needed, re: file upload limit bellow 1mb) ezimage datatype.

This would cleanly allow for your custom needs.

Cheers,

Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Jonathan Clavier

Thursday 28 April 2011 2:11:45 am

Thank you, this answer, and seems very good.
That said, there no way to do this faster?
I find it a bit heavy this technique, just to change a size.
Is there a plugin or something equivalent?
Thank you in advance.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 10:23:49
Script start
Timing: Jan 18 2025 10:23:49
Module start 'layout'
Timing: Jan 18 2025 10:23:49
Module start 'content'
Timing: Jan 18 2025 10:23:50
Module end 'content'
Timing: Jan 18 2025 10:23:50
Script end

Main resources:

Total runtime0.7816 sec
Peak memory usage4,096.0000 KB
Database Queries69

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0045 587.7969152.6094
Module start 'layout' 0.00450.0025 740.406339.4375
Module start 'content' 0.00700.7730 779.8438608.4141
Module end 'content' 0.78000.0015 1,388.257816.1875
Script end 0.7815  1,404.4453 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.4264160.0002
Check MTime0.00140.1781160.0001
Mysql Total
Database connection0.00080.105910.0008
Mysqli_queries0.714991.4682690.0104
Looping result0.00060.0823670.0000
Template Total0.753996.520.3769
Template load0.00240.309020.0012
Template processing0.751596.150020.3757
Template load and register function0.00010.017810.0001
states
state_id_array0.00170.222910.0017
state_identifier_array0.00100.127720.0005
Override
Cache load0.00210.2662370.0001
Sytem overhead
Fetch class attribute can translate value0.00050.062430.0002
Fetch class attribute name0.00100.131480.0001
XML
Image XML parsing0.00130.163930.0004
class_abstraction
Instantiating content class attribute0.00000.002390.0000
General
dbfile0.00140.1847230.0001
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 22
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs