Uploaded Object default location

Author Message

Mihai007 Pop

Monday 26 November 2007 5:05:47 am

When a user clicks on the attachment paperclip to upload a new image/file/etc..., there is an option to place it in a certain location.

The options are: automatic, images, files, etc...! The nice thing about this when you upload it to an existing class (eg. article), the article itself is shown in the list. This means that all the images uploaded to this class will be placed as children of this class.

However, when you first create a new class, the option is not shown for the new class. I understand that it is because the class has not been made yet. But I know that a draft has been created. This means that it can be temporarily associated to the draft before associated to the actual class when published.

I just don't know where the uploaded files are placed once they have been placed in the "automatic" option.

For a news site, this would work nice because a writer could write the document, upload the files, and show them in the article (all under one class). No back-and-fourths.

André R.

Monday 07 January 2008 6:48:34 am

automatic are based on the settings defined in content.ini depending on the file you upload, bye default they end up in the media library.

As for the storing as children before it's published, that's not currently easy since the object doesn't have have node assignment yet.

Adding such a feature would probably involve storing the relations as drafts without a node, and add the node placement with a cronjob/ workflow when the object is published or in some way when you hit publish on the main object ( id's could be stored as session ).

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

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 05:08:50
Script start
Timing: Jan 18 2025 05:08:50
Module start 'layout'
Timing: Jan 18 2025 05:08:50
Module start 'content'
Timing: Jan 18 2025 05:08:51
Module end 'content'
Timing: Jan 18 2025 05:08:51
Script end

Main resources:

Total runtime0.5168 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0064 587.9219152.6250
Module start 'layout' 0.00640.0029 740.546939.4609
Module start 'content' 0.00930.5059 780.0078524.0781
Module end 'content' 0.51510.0016 1,304.08598.1563
Script end 0.5167  1,312.2422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.6389160.0002
Check MTime0.00140.2639160.0001
Mysql Total
Database connection0.00120.229510.0012
Mysqli_queries0.470591.0470540.0087
Looping result0.00060.1098520.0000
Template Total0.484693.820.2423
Template load0.00220.416620.0011
Template processing0.482593.359620.2412
Template load and register function0.00020.029810.0002
states
state_id_array0.00080.158710.0008
state_identifier_array0.00090.179420.0005
Override
Cache load0.00170.3373130.0001
Sytem overhead
Fetch class attribute can translate value0.00090.172520.0004
Fetch class attribute name0.00130.258730.0004
XML
Image XML parsing0.00070.139120.0004
class_abstraction
Instantiating content class attribute0.00000.001530.0000
General
dbfile0.00070.1398170.0000
String conversion0.00000.002140.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 7
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs