Showing preview of image before it is published

Author Message

Ross Kimbarovsky

Saturday 02 February 2008 10:56:54 am

We would like to let a user upload an image and see a preview of that image before deciding whether to "publish" the image to our site. Since the object does not have node assignment yet, it is not stored as a child item and we are not sure how to show the preview of the upload. Would appreciate any suggestions.

Thanks in advance.

Ross

Ɓukasz Serwatka

Saturday 02 February 2008 11:06:31 am

Hi,

You can take a look on pre-view code in the admin templates. It should be possible to force user to see pre-view (redirect to versionview module) then display publish or edit buttons (show edit button in case he needs to re-upload it.)

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Chad Paulson

Sunday 03 February 2008 9:05:09 pm

I work with Ross. We have several image aliases being created which have various image filters applied to them for watermarking, scaling, and cropping.

The issue we are having revolves around the following scenario:

- Individual X uploads two images on web server A.
- Individual Y requests both thumbnail aliases on web server B and is a presented with one valid image and one broken image.
- Individual Z requests same scenario as Individual Y and is presented with two valid images.

It seems like the images can only be built one at a time. Aside from running a script that automates via cron and touches EVERY thumbnail alias, what is the remedy for such a problem? Is there a setting which allows publication of all image aliases for a given image on upload?

Thanks 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 16:16:37
Script start
Timing: Jan 18 2025 16:16:37
Module start 'layout'
Timing: Jan 18 2025 16:16:37
Module start 'content'
Timing: Jan 18 2025 16:16:38
Module end 'content'
Timing: Jan 18 2025 16:16:38
Script end

Main resources:

Total runtime0.7830 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 588.0469152.6406
Module start 'layout' 0.00630.0026 740.687539.4766
Module start 'content' 0.00890.7728 780.1641576.3750
Module end 'content' 0.78170.0013 1,356.539112.1250
Script end 0.7830  1,368.6641 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.4158160.0002
Check MTime0.00140.1785160.0001
Mysql Total
Database connection0.00100.134010.0010
Mysqli_queries0.736994.1108590.0125
Looping result0.00070.0910570.0000
Template Total0.750695.920.3753
Template load0.00200.251620.0010
Template processing0.748695.609920.3743
Template load and register function0.00030.032810.0003
states
state_id_array0.00140.183810.0014
state_identifier_array0.00110.141520.0006
Override
Cache load0.00160.2062190.0001
Sytem overhead
Fetch class attribute can translate value0.00050.066730.0002
Fetch class attribute name0.00140.178250.0003
XML
Image XML parsing0.00120.152730.0004
class_abstraction
Instantiating content class attribute0.00000.001250.0000
General
dbfile0.00080.1034240.0000
String conversion0.00000.001040.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs