[development] Files directory on installation usability fix notquite usable. ; )

DragonWize dragonwize at gmail.com
Sun Dec 9 18:42:18 UTC 2007

> Correct me if I'm wrong, but I think that putting the whole path in
> there allows sites using the public file transfer method to do plain
> http file transfers instead of having to load Drupal to handle every
> file request.
> While Adrian's suggestion would involve a noticeable performance hit for
> some sites, it might be nice to see as a contrib module.  Sites using
> private file transfer are loading Drupal on each request anyway, so the
> performance question is moot there.  Also, small, low traffic sites
> might just plain not care.
> Susan

No offense, but you are wrong here. Drupal is loaded on private file
because those files are either placed outside the root directory or
disallowed access via another method. The reason drupal is loaded each
time is to check authentication and then pass the non-publicly
accessible file through the connection.

Making the file path in the files table relative to the files folders
would just require one change throughout drupal (core and contrib),
you would have to do something like this when you link to a file:

drupal_get_files_path() . $relative_file_path_in_db

As that produces the direct link and the file is public accessible,
drupal is not loaded.

Alan Doucette
Koi Technology, LLC

More information about the development mailing list