File uploading in two steps

Author Message

Alex xxx

Wednesday 23 April 2008 12:57:30 am

Sorry for my bad english :)

I have content class "UploadedFile" with attributes:
Description (datatype: text line),
UploadDate (datatype: date),
Password (datatype: text line)
UploadFile (datatype: file)

I want to create form for creating new "UploadedFile" objects in two steps:
1 step: Only uploading file
2 step: Fill "description", "password" fields and publish object

How I can create this "wizard" form?

Thank you :)

Alex xxx

Wednesday 23 April 2008 5:15:53 am

The form with file upload field must be visible at the main page (not after click at some button), so, content object "uploaded file" must be created when the file is already uploaded.

I have no ideas how to do this... please, help!

André R.

Wednesday 23 April 2008 7:33:33 am

Take a look at the content/upload module, it will allow you to upload content directly, and settings from content.ini will be used to determinate what class should be created based on file type.

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

Alex xxx

Wednesday 23 April 2008 8:10:13 am

Thank you for answer.
I have understood how to upload a file, but there is question - how to add additional information about the file right after uploading, and how to link this information with uploaded file.

André R.

Wednesday 23 April 2008 8:30:47 am

You can have object name and location as form values while uploading (browse to /content/upload to see form input names if you haven't already), normally you will be redirected to the uploaded file, and there you can have a edit button to let the user further edit the object(see for instance in the forum templates for how this edit button should be set up).

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

Alex xxx

Wednesday 23 April 2008 8:45:11 am

I want to view object edit form (to fill information about uploaded file) RIGHT AFTER upload.
And object must be published (or visible, as variant) only after user filled second form.
Can I specify content/upload to redirect to object editing mode after the upload?

Alex xxx

Wednesday 23 April 2008 8:56:28 am

Example:
http://img217.imageshack.us/my.php?image=uploadhq1.jpg

André R.

Wednesday 23 April 2008 11:53:26 am

> Can I specify content/upload to redirect to object editing mode after the upload?

No, you'll have to create your own module / view for uploading to accomplish that, since content edit needs the object id witch isn't created before the upload is completed.

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

Alex xxx

Wednesday 23 April 2008 12:29:16 pm

Thank you, I'll try to create own module.

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

Main resources:

Total runtime0.0167 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 589.0469152.6250
Module start 'layout' 0.00610.0029 741.671939.4453
Module start 'content' 0.00890.0059 781.117297.3203
Module end 'content' 0.01480.0018 878.437542.3047
Script end 0.0166  920.7422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002414.1095140.0002
Check MTime0.00116.7904140.0001
Mysql Total
Database connection0.00105.915910.0010
Mysqli_queries0.003420.341230.0011
Looping result0.00000.065710.0000
Template Total0.00148.710.0014
Template load0.00084.608410.0008
Template processing0.00074.021110.0007
Override
Cache load0.00053.213710.0005
General
dbfile0.00158.848180.0002
String conversion0.00000.034340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs