Change upload path
Last updated on
30 April 2025
Files uploaded as field respect field path settings. For files uploaded via the provider's form (Scald Flash, Scald Audio...), use hook_form_FORM_ID_alter() to modify the path. For example, to change Flash path to the 'atoms/swf/YYYY/mm/dd' structure:
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');
}
}
Help improve this page
Page status: Not set
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion