Will this module work if "Private filesystem" is chosen at admin/settings/file-system?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mikeytown2’s picture

Category: support » feature
Priority: Normal » Major

It could be made to work. Good idea.

mikeytown2’s picture

@HLopes
I've never dealt with Drupal's private file system. Does it use htaccess rules to limit access to the files directory?

mikeytown2’s picture

Status: Active » Fixed
FileSize
23.58 KB
23.58 KB

Private file system workaround added in. You need to create a writable directory in your webroot. If you have the cache folder from boost, you can use that.

This is the patch that was applied.

mikeytown2’s picture

FileSize
8.95 KB

did another change in regards to the private file system. This patch has been committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

HLopes’s picture

Works like a charm... Had some issues to install it properly, but it boiled down to a missing variable in page.tpl.php.

You could also add functionality to create the necessary folders at advagg.admin.inc, around line 299, if folders don't exist.

$path_arr = explode('/',$files_dir);
$cumulative = array_shift($path_arr);

foreach($path_arr as $k => $v){
  file_check_directory($cumulative,1,NULL);
  $cumulative .= '/'.$v;
}

Something like that....

mikeytown2’s picture

Status: Closed (fixed) » Needs review
FileSize
712 bytes

mind testing this patch?


        // Create Dirs
        foreach (advagg_get_root_files_dir() as $full_dir) {
          $path_array = explode('/', $full_dir);
          $cumulative = array_shift($path_array);
          foreach ($path_array as $dir) {
            file_check_directory($cumulative, 1);
            $cumulative .= '/' . $dir;
          }
        }
mikeytown2’s picture

better patch

mikeytown2’s picture

Status: Needs review » Fixed
FileSize
1.86 KB

committed this patch

HLopes’s picture

Tried the last version, everything OK.

Nice.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.