I don't really understand why the files are not just stored relative to the files folder rather than the site root.

That way, changing the location of the files folder would only entail changing the file path inside the administration.

When retrieving file paths the function doing that could simply call file_directory_path() and append the filepath from the database. Isn't this how it should standardly be dealt with, or did I miss something?

AA

On Thu, Jul 16, 2009 at 4:40 PM, Earnie Boyd <earnie@users.sourceforge.net> wrote:
Quoting Luc Stroobant <lstroobant@gmail.com>:

Clemens Tolboom wrote:
Having a development test acceptance and production environment it's a
drag when moving the production database and files to an acceptance or
development environment.

One has to update the files database table and more tables or do
trickery with symlinks to get the site running clean.

If we could make the filepath in the files table relative to
the /admin/settings/file-system path the real files are relocatable
without pain. Just do a db load and a rsync to get the files and change
the dmin/settings/file-system path.

What do you think? Did I miss something important?

On *nix you can easily workaround this problem by creating your site directory as sites/sitename and adding the actual urls as symlinks

So you get something as

directory: mysite
link: www.mysite.com -> mysite
link: dev.mysite.com -> mysite

entries in the files table will always look like sites/mysite/files/file.ext
and are the same for dev and prod...


And on windows

junction www.mysite.com mysite
junction dev.mysite.com mysite

--
Earnie
-- http://r-feed.com/           -- http://for-my-kids.com/
-- http://www.4offer.biz/       -- http://give-me-an-offer.com/





--
Ashraf Amayreh
http://aamayreh.org