eZ Community » Forums » Developer » Uploading files to multi-site...

Uploading files to multi-site configuration

Uploading files to multi-site configuration

Wednesday 06 April 2011 10:58:21 am - 2 replies


I've just recently started developing in eZPublish, and I have now set up a multi-site configuration for a project I'm working on. In my site.ini.append.php file I have set up both URL and Host mapping. That is, I have set up the site as such:







My goal with this setting is to have a unified admin interface for both sites. That is, I can access the admin interface by typing the URL www.site1.com/index.php/admin or www.site2.com/index.php/admin. This works like a charm! happy.gif Emoticon

The problem arises when I upload a file to the Media section when in the admin interface. The file then gets stored at the /var/admin/storage/original... folder. This means that when a user is presented with the option to download a file that has been uploaded in the admin interface, they first have to log on to the admin interface!! WE DO NOT WANT TO DO THAT!

Any ideas?

Wednesday 06 April 2011 11:38:06 am

Possible mistakes:
Are you using different var dir's for the different siteaccesses? (when siteaccesses share content they should use same var folder)
Or is there something wrong with the virtualhost matching rules maybe, so that Apache does not handle the var/admin path correctly.

Modified on Wednesday 06 April 2011 11:38:56 am by André R

Thursday 07 April 2011 1:19:52 pm

Yes, I'm using different var dir's for the different siteaccesses. But that's because the sites don't share content.

I've checked the virtualhost matching rules, and they are correct. I found a solution that I can live with. The problem was that uploaded files to the Media Library was stored in the var/storage directory under the var/admin folder. This meant that you had to access the admin siteaccess to download the files (when used as links in articles etc). In the site.ini.append.php file in the admin siteaccess, i just added the following line:



This solved my problem perfectly. The files are still stored under admin's var directory, but that I can live with happy.gif Emoticon


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from