You are here

function file_force_create_url in File Force Download 6.2

Same name and namespace in other branches
  1. 7 file_force.module \file_force_create_url()

Simplified version of the default file_create_url method to avoid private download method dependency.

7 calls to file_force_create_url()
file_force_itweak_uploads_prerender_alter in ./file_force.module
Implementation of hook_itweak_uploads_prerender_alter().
file_force_preprocess_comment_upload_attachments in ./file_force.theme.inc
Preprocess function for comment_upload's theme_comment_upload_attachments().
file_force_upload_attachments in ./file_force.theme.inc
Displays file attachments in table
theme_file_force_file in ./file_force_formatter.inc
Theme function for the 'generic' single file formatter.
theme_file_force_formatter_imagecache_imagelink_ff in ./file_force_formatter.inc
Theme function for the 'image link' imagecache formatter.

... See full list

File

./file_force.module, line 219
file_force.module

Code

function file_force_create_url($path) {

  // Strip file_directory_path from $path. We only include relative paths in urls.
  if (strpos($path, file_directory_path() . '/') === 0) {
    $path = trim(substr($path, strlen(file_directory_path())), '\\/');
  }
  return url('system/files/' . $path, array(
    'absolute' => TRUE,
  ));
}