Forums / Setup & design / S.O.S :) How can I upload an entire folder?

S.O.S :) How can I upload an entire folder?

Author Message

Roy Jonse

Monday 07 August 2006 12:56:09 am

Hi all,

I need some urgent help:
After overiding some tpl files and getting the desired look - I'm in the stage of filling the real content to my site which functions as intranet site.
The problem is that I got a huge number of files and folders and I would like to know if there is a quick and efficient way to upload an entire folder with all its corresponding sub-folders and files in one time. Instead of creating manualy each one of the folders in its right place in the hierarchical tree + creating each one of the files...

I would really appreciate any help,
Thanks in advance,
Roy

Paul Borgermans

Monday 07 August 2006 2:39:39 am

Hi Roy

The webdav interface is made for this:

http://ez.no/doc/ez_publish/technical_manual/3_8/features/webdav

--paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Roy Jonse

Monday 07 August 2006 4:07:51 am

Thanks Paul for the quick response!

I tried to read the documentation about this feature.
Before I try to fix it on my system I want to know if I understand you correctly -
From the webdav if I upload from the local machine a folder which contains subfolders and files, then all these subfolders and files will automatically be created and uploaded?

By the way - I used the windows installer to install the ezPublish on my server and now I'm trying to enable the webdav. Is there any help regarding the installation besides the documentation (which is very short and no detailed) ?

Thanks again
Roy

Paul Borgermans

Monday 07 August 2006 4:28:08 am

I tried to read the documentation about this feature.
Before I try to fix it on my system I want to know if I understand you correctly -
From the webdav if I upload from the local machine a folder which contains subfolders and files, then all these subfolders and files will automatically be created and uploaded?

Yes, that's correct

There is not much documentation, but it is not difficult either.

See also http://ez.no/doc/ez_publish/technical_manual/3_8/installation/virtual_host_setup

The snippet below should be enough for your virtual host config:

RewriteCond %{HTTP_HOST} ^webdav\..*
RewriteRule ^(.*) /webdav.php [L]

or if you have it/want it on a dedicated port or hostname:

        RewriteRule ^(.*) /webdav.php

instead of calling index.php

hth

--paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Roy Jonse

Monday 07 August 2006 7:12:27 am

Hi Paul,

First of all I would like to say that I really appriciate your quick response again - thanks a lot!
Unfortunatly I did not get any results... :(
I tried to follow the "Setting it up" instructions + add the snippet you attached but when I get to the final stage of testing it - it does not work.
These are my steps:

1) Installing ezPublish with the <i> windows installer</i>.
2) Enabling the WebDAV server - I changed the following lines straight in "webdav.ini" (no overide) :

[GeneralSettings]
EnableWebDAV=true

3) Adding the desired siteaccesses : (I just added the last line "SiteList[]=webdav" , don't know if it's enough)

[SiteSettings]
SiteList[]
SiteList[]=webdav

4) Configure the web server. this is my ezpublish.conf which is located in- C:\eZpublish\apache\conf\ezpublish.conf

# Enable rewrite rules
LoadModule rewrite_module modules/mod_rewrite.so
AddModule mod_rewrite.c

<VirtualHost *>
<Directory "c:\eZpublish\ezpublish">
Options FollowSymLinks Indexes ExecCGI
AllowOverride All
</Directory>
DocumentRoot "c:\eZpublish\ezpublish"

RewriteEngine On
# For all known data directories we let Apache serve it directly
Rewriterule ^/var/storage/.*                                                    - [L]
Rewriterule ^/var/[^/]+/storage/.*                                              - [L]
RewriteRule ^/var/cache/texttoimage/.*                                          - [L]
RewriteRule ^/var/[^/]+/cache/texttoimage/.*                                    - [L]
Rewriterule ^/design/[^/]+/(stylesheets|images|javascript)/.*                   - [L]
Rewriterule ^/share/icons/.*                                                    - [L]
Rewriterule ^/extension/[^/]+/design/[^/]+/(stylesheets|images|javascripts?)/.* - [L]
Rewriterule ^/packages/styles/.*                                                - [L]

# Compatability with 3.3 and lower


RewriteRule ^/kernel/setup/packages/.*                                          - [L]

# If not PHP should serve the page
#Rewriterule .* /index.php
Rewriterule .* /webdav.php


ServerName localhost
</VirtualHost>

as you can see I add in the end the line : Rewriterule .* /webdav.php instead of #Rewriterule .* /index.php

5) Now I try to open it from the IE browser : File->open : http://prod/ and checking the Open as webfolder check box. (http://prod/ is the url which leads to homepage of the user_intranet_site)
but I get the following message:
Internet explorer could not open http://prod/ as a webfolder.

What have I done wrong?

Thanks in advance
Roy

Xavier Dutoit

Monday 07 August 2006 8:43:17 am

Hi,

Have a look at the logs in var/webdav.log (or maybe your siteaccess) it should provide you more information.

Otherwise, the idea is to create a new subdomain webdav.domain.com, not to replace the main one, so instead of replacing, that's creating another apache configuration.

X+

http://www.sydesy.com

Roy Jonse

Monday 07 August 2006 10:17:23 am

Hi Xavier,

1) I couldn't find any file with the naem webdav.log - what should I look for in the siteaccess folder?
2) How do I create a new subdomain webdav.domain.com ?

Currently if I understood correctly - I have two sites : intranet_site and intranet_site_admin.
They are located on some machine in my network called "Prod" so right now if I write in the address bar "http://prod" from any other machine in the network it takes me to the Intranet_site login page. and if I write "http://prod/intranet_site_admin" it takes me to the admin login page.
so acctually I have 2 siteaccesses ?
and what should I do next - create a 3rd siteaccess for the webdav?

Thanks again
Roy

Kristof Coomans

Monday 07 August 2006 10:33:19 am

1)
Make sure your webserver has write permissions to $ezroot/var/ and anything beneath it.
Enable WebDAV logging in settings/override/webdav.ini.append(.php):

[GeneralSettings]
Logging=enabled

Now take a look in the webdav.log file under var/log and var/siteaccess/log

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Xavier Dutoit

Monday 07 August 2006 2:39:22 pm

Hi,

No, you shouldn't create a 3rd siteaccess. You should create a new sub domain name and associate it with the configuration you described.

On linux, that's a few seconds process to create new domain names and modif the config files of apache for that. It shouldn't be much more complicated do to that on windows.

X+

http://www.sydesy.com

Roy Jonse

Tuesday 08 August 2006 1:08:16 am

Thank you both Kristof and Xavier,

Make sure your webserver has write permissions to $ezroot/var/ and anything beneath it

Kristof - Can you please tell me how do I do that?

Xavier - this is part of my site.ini.append.php file

[SiteAccessSettings]
CheckValidity=false
AvailableSiteAccessList[]
AvailableSiteAccessList[]=intranet_site
AvailableSiteAccessList[]=intranet_site_admin

MatchOrder=host

//MatchOrder=uri
//HostMatchMapItems[]=intranet_site
//RelatedSiteAccessList[]=intranet_site
//HostMatchMapItems[]=intranet_site_admin
//RelatedSiteAccessList[]=intranet_site_admin
HostMatchMapItems[]=localhost;intranet_site
HostMatchMapItems[]=localhost.admin;intranet_site_admin

and this is my expublish.conf file

# Enable rewrite rules
LoadModule rewrite_module modules/mod_rewrite.so
AddModule mod_rewrite.c

<VirtualHost *>
<Directory "c:\eZpublish\ezpublish">
Options FollowSymLinks Indexes ExecCGI
AllowOverride All
</Directory>
DocumentRoot "c:\eZpublish\ezpublish"

RewriteEngine On
# For all known data directories we let Apache serve it directly
Rewriterule ^/var/storage/.*                                                    - [L]
Rewriterule ^/var/[^/]+/storage/.*                                              - [L]
RewriteRule ^/var/cache/texttoimage/.*                                          - [L]
RewriteRule ^/var/[^/]+/cache/texttoimage/.*                                    - [L]
Rewriterule ^/design/[^/]+/(stylesheets|images|javascript)/.*                   - [L]
Rewriterule ^/share/icons/.*                                                    - [L]
Rewriterule ^/extension/[^/]+/design/[^/]+/(stylesheets|images|javascripts?)/.* - [L]
Rewriterule ^/packages/styles/.*                                                - [L]

# Compatability with 3.3 and lower


RewriteRule ^/kernel/setup/packages/.*                                          - [L]

# If not PHP should serve the page
#Rewriterule .* /index.php
Rewriterule .* /webdav.php

ServerName localhost
ServerAlias localhost.admin
</VirtualHost>

Can you figure what have I done wrong?
maybe it becouse of my installation? I now see that the installers are only ment for testing and not for production..

Thanks again
Roy