Home ›
Drupal function to give path to files directoryDrupal function to give path to files directory
Submitted by Benjamin Melançon on October 14, 2008 - 3:04am
All Agaric wanted was the Drupal function to give the path to files directory (which Drupal core itself should probably use instead of embedding the full filepath in the files database), and finding it was soooooo much harder to find than it should have been.
The Drupal function which we suppose we ought to use is file_create_url().
See http://api.drupal.org/api/function/file_create_url/5
Which will work even if the file system is made private
See also:
http://api.drupal.org/api/function/file_directory_path/5
http://api.drupal.org/api/function/file_create_path/5
Reference
Here's the article I was trying to find:
Handling of public and private files in Drupal
http://symbiotix.net/articles/handling-public-and-private-files-drupal
Resolution
Searched words:
path to users' uploaded files in drupal
drupal public files function
drupal public files function warning
drupal public private files function
drupal call files
public private safe file handling drupal
public private drupal file save trouble
do you know a function to get the path to a Drupal site's files directory?
path to files () ??
nope
Comments
Post new comment