Commit 7e628cf7 authored by mtodor's avatar mtodor Committed by Primsi

Issue #3101967 by mtodor: Missing directory upload error

parent 9670437f
......@@ -262,7 +262,7 @@ class DropzoneJsEbWidget extends WidgetBase {
// it's still better not to rely only on client side validation.
if (($trigger['#type'] == 'submit' && $trigger['#name'] == 'op') || $trigger['#name'] === 'auto_select_handler') {
$upload_location = $this->getUploadLocation();
if (!$this->fileSystem->prepareDirectory($upload_location, FileSystemInterface::MODIFY_PERMISSIONS)) {
if (!$this->fileSystem->prepareDirectory($upload_location, FileSystemInterface::CREATE_DIRECTORY | FileSystemInterface::MODIFY_PERMISSIONS)) {
$form_state->setError($form['widget']['upload'], $this->t('Files could not be uploaded because the destination directory %destination is not configured correctly.', ['%destination' => $this->getConfiguration()['settings']['upload_location']]));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment