Forums / Developer / Right for upload ?

Right for upload ?

Author Message

Fabien Mas

Monday 02 April 2007 1:54:58 am

I would like to add files from the media library with a browse button in a front page
I have created my own extension, which is not totally made in an ezpublish way.
so I have to create my file object manually

I have found this, it only works when I am logged as administrator
Which right must I give to my others users ?

 include_once( 'kernel/classes/ezcontentupload.php' );
 $upload = new eZContentUpload();
 $uploadedOk = $upload->handleUpload( $result, 'fileName', false, 'test' );

thx, Fabien :)

Fabien Mas

Wednesday 11 April 2007 12:59:06 am

I've found it :
Content >> create >> and my node where I want to upload ...

eZ debug

Timing: Jan 18 2025 16:24:07
Script start
Timing: Jan 18 2025 16:24:07
Module start 'content'
Timing: Jan 18 2025 16:24:07
Module end 'content'
Timing: Jan 18 2025 16:24:07
Script end

Main resources:

Total runtime0.0166 sec
Peak memory usage2,048.0000 KB
Database Queries4

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 587.5938180.8438
Module start 'content' 0.00620.0053 768.437593.8516
Module end 'content' 0.01150.0050 862.289166.7031
Script end 0.0165  928.9922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002213.3206120.0002
Check MTime0.00106.0313120.0001
Mysql Total
Database connection0.00084.589210.0008
Mysqli_queries0.002716.341340.0007
Looping result0.00010.609620.0001
Template Total0.004627.610.0046
Template load0.00085.083810.0008
Template processing0.003722.504810.0037
Override
Cache load0.00063.515310.0006
General
dbfile0.00053.0868100.0001
String conversion0.00000.034530.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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