Forums / Developer / Size upload image

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.

eZ debug

Timing: Jan 29 2025 23:48:20
Script start
Timing: Jan 29 2025 23:48:20
Module start 'content'
Timing: Jan 29 2025 23:48:20
Module end 'content'
Timing: Jan 29 2025 23:48:20
Script end

Main resources:

Total runtime0.1158 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 587.8281180.8516
Module start 'content' 0.00490.0051 768.679797.9453
Module end 'content' 0.01000.1057 866.6250525.8438
Script end 0.1157  1,392.4688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00282.3793200.0001
Check MTime0.00110.9474200.0001
Mysql Total
Database connection0.00060.558610.0006
Mysqli_queries0.077967.25071410.0006
Looping result0.00080.72281390.0000
Template Total0.105591.110.1055
Template load0.00060.493210.0006
Template processing0.104990.585210.1049
Override
Cache load0.00040.339310.0004
Sytem overhead
Fetch class attribute can translate value0.00050.419710.0005
XML
Image XML parsing0.00020.158810.0002
General
dbfile0.00726.1859200.0004
String conversion0.00000.004330.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs