Forums / Developer / Showing preview of image before it is published

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.