Hello

When dealing with large amount of assets, performance problems can occure on some filesystem if too much files are stored in the same directory.
Would it be possible to implement in scald core a files organization strategy per content type with YYYY/MM/DD date tokens ?

Thank you very much !

Pascal

Comments

jcisio’s picture

Title: Adding a date token in the files directory organization in order to avoid performance problem » Respect field path settings for thumbnails

There are two problems to solve:

- Thumbnails are not stored in the directory specified in the thumbnail field settings. We'll fix it in this issue (if fieldfield_paths is enabled, it is done automatically and does not need this fix).

- Files which are not a field (audio and flash in core): the destination directory should already be configurable via hook_form_alter() for hook_form_FORM_ID_alter(). For example:

function mymodule_form_scald_atom_add_form_add_alter(&$form, $form_state, $form_id) {
  if ($form_state['scald']['source'] == 'scald_flash') {
    $form['file_swf']['#upload_location'] = 'public://atoms/swf/' . date('Y/m/d');
  }
}

Of course, if provider expose the path settings via UI it'd be better.

jcisio’s picture

Status: Active » Fixed

The thumbnail path is fixed with 3866598. If you want to move old files to the new structure (supposing that you've have configured field path), you'll need Filefield Paths with the retro option (once it is done, you can uninstall that module).

jcisio’s picture

Documentation created https://drupal.org/node/2029403.

Status: Fixed » Closed (fixed)

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