Storing the path to a file

Author Message

James Packham

Friday 05 March 2004 3:22:15 am

Hi,

I've got a little annoying problem:

I have a very long input form for one of my classes, of which one of the attributes is an image. If I make a mistake and the template has to be reloaded I 'lose' the location of the file from the browse box. If I just ignore this (simulating a user who might not have noticed) and successfully submit the object without respecifying the image, it (the image) isn't 'attached' to the object!

After hunting around in the $http.post variables I'm at a loss to find the text containing the location of the file. Has anyone got any stories/ideas about how they got around this? How is this text stored and how can I display it in the 'browse box'? Can I use some kind of section show to hide the input once the location of the image has been specified?

Thanks in advance,

James

liu spider

Friday 05 March 2004 9:12:30 am

first, you can set the image as compulsory, so if the user forget to upload the image, an error will occur

Second, let the users hit the store button as soon as they specified the image file

http://liucougar.scim-im.org
SCIM Input Method Platform
http://scim.sf.net
SJSD Online Editor
http://sf.net/projects/sjsd

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 31 2025 06:27:14
Script start
Timing: Jan 31 2025 06:27:14
Module start 'layout'
Timing: Jan 31 2025 06:27:14
Module start 'content'
Timing: Jan 31 2025 06:27:15
Module end 'content'
Timing: Jan 31 2025 06:27:15
Script end

Main resources:

Total runtime0.9495 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.0072 588.1328151.2109
Module start 'layout' 0.00720.0035 739.343836.6484
Module start 'content' 0.01070.9381 775.9922921.2422
Module end 'content' 0.94880.0007 1,697.23447.8516
Script end 0.9495  1,705.0859 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3334160.0002
Check MTime0.00140.1451160.0001
Mysql Total
Database connection0.00110.119610.0011
Mysqli_queries0.898294.5978540.0166
Looping result0.00040.0425520.0000
Template Total0.911696.020.4558
Template load0.00170.178720.0008
Template processing0.909995.821120.4549
Template load and register function0.00120.124710.0012
states
state_id_array0.00120.127310.0012
state_identifier_array0.00100.105520.0005
Override
Cache load0.00130.1392140.0001
Sytem overhead
Fetch class attribute can translate value0.00040.044020.0002
Fetch class attribute name0.00190.204240.0005
XML
Image XML parsing0.00230.241120.0011
class_abstraction
Instantiating content class attribute0.00000.000640.0000
General
dbfile0.00820.8646220.0004
String conversion0.00000.001140.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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 8
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs