Skip to content

Commit

Permalink
'custom_storage_folder'
Browse files Browse the repository at this point in the history
  • Loading branch information
butt committed Feb 7, 2012
1 parent 2e1493f commit be95c1c
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Form/JQuery/Type/FileType.php
Expand Up @@ -83,7 +83,12 @@ public function buildView(FormView $view, FormInterface $form)
$data = new File($form->getAttribute('rootDir') . '/' . $data);
}

$value[] = $configs['folder'] . '/' . $data->getFilename();
if ($configs['custom_storage_folder']){
$value[] = $form->getClientData();
}else{
$value[] = $configs['folder'] . '/' . $data->getFilename();
}

}

$value = implode(',', $value);
Expand All @@ -92,7 +97,12 @@ public function buildView(FormView $view, FormInterface $form)
$datas = new File($form->getAttribute('rootDir') . '/' . $datas);
}

$value = $configs['folder'] . '/' . $datas->getFilename();
if ($configs['custom_storage_folder']){
$value[] = $form->getClientData();
}else{
$value[] = $configs['folder'] . '/' . $datas->getFilename();
}

}

$view->set('value', $value);
Expand Down

0 comments on commit be95c1c

Please sign in to comment.