Bulk uploading: Would it work that way?

Author Message

Sebastian Picklum

Tuesday 24 January 2006 7:29:41 pm

Browsing through the source code, I found the function

function handleLocalFile( &$result, $filePath, $location, $existingNode )

As I've been looking for a way to do bulk uploading via FTP, I'm wondering if a PHP script that loops this function several times would place uploaded FTP-files correctly in the eZ Publish repository.

Hasn't there been a short description on writing modules in documentation? Can't find it anymore...

Regards Sebastian

sp@php.net

Gabriel Ambuehl

Wednesday 25 January 2006 6:37:06 am

How about just using WebDAV? That's by far the easiest way for mass uploads... And any of the current OS can do it without requiring additional clients.

It would obviously be possible to write a module to do what you want but it might not be worth the work.

Visit http://triligon.org

Sebastian Picklum

Wednesday 25 January 2006 7:04:51 am

The problem with WebDAV is that I'm using MacOS X. When I upload a File using the OSX Finder or Goliath, I gets corrupted (File size shows <100 bytes and I see two files: "._example.jpg" and "example.jpg".

Secondary, the company which hosts my private eZ Publish installation doesn't allow WebDAV "for security reasons".

sp@php.net

Xavier Dutoit

Wednesday 25 January 2006 7:21:30 am

Hi,

To find modules examples, the easiest is probably to go to pubsvn and browse the existing ones.

Beside the stupidity of the argument about security (that seem to be a valid reason to justify about anything, from doing a war on the gulf to spying on all your citizens), you don't need them to install anything, as that's just a matter of creating a new virtual domain and add a few rewrite rules.

X+

http://www.sydesy.com

Sebastian Picklum

Wednesday 25 January 2006 2:23:59 pm

Of course I could browse the SVN. But it would be nicer to have a specification how certain things have to be done. I don't want to destroy my db...

I don't no either why my new hosting company regards WebDAV as insecure. Especially because they do nearly everything else (I also got my eZ publish installation done by one of the server admins - saved some time...).

Btw. I managed to setup WebDAV on a dedicated test-server but I couldn't access it via any of the Mac-clients. When using cadaver on my local linux box, I can see the root directory of the server with the "plain_user" siteaccess. But I can't get in because the authentication fails (even with user "admin").... Argh!

sp@php.net

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 21:08:59
Script start
Timing: Jan 18 2025 21:08:59
Module start 'layout'
Timing: Jan 18 2025 21:08:59
Module start 'content'
Timing: Jan 18 2025 21:09:01
Module end 'content'
Timing: Jan 18 2025 21:09:01
Script end

Main resources:

Total runtime1.4603 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0107 587.9297152.6250
Module start 'layout' 0.01080.0032 740.554739.4453
Module start 'content' 0.01391.4448 780.0000587.1563
Module end 'content' 1.45870.0016 1,367.156312.1563
Script end 1.4602  1,379.3125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.2321160.0002
Check MTime0.00150.1031160.0001
Mysql Total
Database connection0.00170.116410.0017
Mysqli_queries1.400295.8846650.0215
Looping result0.00090.0595630.0000
Template Total1.416397.020.7081
Template load0.00200.135920.0010
Template processing1.414396.849720.7071
Template load and register function0.00020.014910.0002
states
state_id_array0.00080.052910.0008
state_identifier_array0.00350.240320.0018
Override
Cache load0.00170.1131240.0001
Sytem overhead
Fetch class attribute can translate value0.00070.048230.0002
Fetch class attribute name0.00170.115060.0003
XML
Image XML parsing0.00080.051730.0003
class_abstraction
Instantiating content class attribute0.00000.001060.0000
General
dbfile0.00080.0572160.0001
String conversion0.00000.000540.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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.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: 15
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs