Caution: This documentation is for eZ Publish legacy, from version 3.x to 6.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

Upload image to related objects

With this function it is possible to upload and store a related image/object while editing content. You choose were to store the object, but it will be connected/related to the article you are working on. The function is introduced in eZ Publish 4.6 to save time for content editors.

Prerequisite: A prerequisite to get this upload functionality is that the article/object you are working on is created from a content class with the attributes “Object relation”/”Object relations”. The functionality will work for all classes where new instances can be created with an upload (File, Video, ...). This is linked to the configuration in “upload.ini/[CreateSettings]”

This is a daily operation for content editors and takes up much time if they want to have a nicely categorized media library and re-use the images in articles as front-page images or thumbnails (i.e. not uploading in the XML Text with the Online Editor).

 When in the object edit interface of an article the editor will now be able to

:

  • Click “Upload a file”
  •  Choose file
  • Choose the “Location”
  •  Preview the content and press “Add” to add it to the relation
  •  The file is automatically uploaded in the right location and added as a relation to the current object.

Read more on how to setup a class with the upload functionality and how to work with the functionality in the sections below.

Create a class with the object relation/s attribute

The steps below explains how this functionality is activated on a class:

  • Go to “Setup” - Select “Classes”
  • Select “Content” and “New class”
  • Name the class
  • Select and add the “Object relation” attribute by pressing “Add attribute” in the screen below:

          

Adding Object Relation Attribute

Adding Object Relation Attribute

  • In the “Object relation” attribute screen below you make your selections regarding the attribute.
    Class Attribute Definition

    Class Attribute Definition

  • Select “Image” as the “Default Selection Item” (or any class where new instances can be created with an upload, like File, Video,... This is linked to the configuration in “Upload.ini/[CreateSettings]”). Click on the "Select Item" button to do that.

The system is now ready to use the new upload function on this newly created class.

How to upload and store images/files on an article/object

Prerequisite: A prerequisite for storing images or other objects on related articles or other objects is that the object is created on a content class with the attributes “Object relation” or “Object relations” as described under “Create a class with the object relations attribute”.

Create the article based on the content class created with an object relations attribute. To this article/object you wish to store an image/file. In the object edit interface of the object you can now either “Add an existing object” or “Upload a file” directly while still working on the same article as is shown in the screen below:

Adding Object in the Relation

Adding Object in the Relation

Add existing objects

When you select “Add an existing file” you wish to re-use an existing file to your article. You will be presented with your explorer and can browse for the file you wish to use.

Upload a file

When you select “Upload a file” you will enter a 3 step process that will upload and connect a file to an article. In the first step you browse for a file and upload it as shown in the screen below:

Uploading a File Step 1

Uploading a File Step 1

In the next screen you will be told that the file is uploaded and asked to select a location where you wish to store the image/file as shown below:

Uploading a File Step 2

Uploading a File Step 2

In the third step you will get a preview of the image/object. When you press “Add” the newly created object will be added to the relation the editor is working on.

Uploading a File Step 3

Uploading a File Step 3

You will now be taken back to the article/object and can continue to edit it or to select more images, videos or other objects to connect to your article.

Note: The object you are working on might be a blog, an article, a forum, an event, a gallery or other, as long as it is based on a content class that can be created with an “Object relation” or an “Object relations” attribute.

Geir Arne Waaler (12/01/2012 1:59 pm)

Andrea Melo (22/01/2013 5:01 pm)

Geir Arne Waaler, Andrea Melo


Comments

There are no comments.