diff -u b/core/modules/file/src/Plugin/Field/FieldType/FileItem.php b/core/modules/file/src/Plugin/Field/FieldType/FileItem.php --- b/core/modules/file/src/Plugin/Field/FieldType/FileItem.php +++ b/core/modules/file/src/Plugin/Field/FieldType/FileItem.php @@ -51,7 +51,7 @@ public static function defaultFieldSettings() { return array( 'file_extensions' => 'txt', - 'file_directory' => 'assets/[date:custom:Y][date:custom:m][date:custom:d]', + 'file_directory' => 'assets/[date:custom:Y]/[date:custom:m]/[date:custom:d]', 'max_filesize' => '', 'description_field' => 0, ) + parent::defaultFieldSettings(); diff -u b/core/modules/file/src/Tests/FileFieldPathTest.php b/core/modules/file/src/Tests/FileFieldPathTest.php --- b/core/modules/file/src/Tests/FileFieldPathTest.php +++ b/core/modules/file/src/Tests/FileFieldPathTest.php @@ -38,8 +38,8 @@ $date_formatter = $this->container->get('date.formatter'); $expected_filename = 'public://assets/' . - $date_formatter->format(REQUEST_TIME, 'custom', 'Y') . - $date_formatter->format(REQUEST_TIME, 'custom', 'm') . + $date_formatter->format(REQUEST_TIME, 'custom', 'Y') . '/' . + $date_formatter->format(REQUEST_TIME, 'custom', 'm') . '/' . $date_formatter->format(REQUEST_TIME, 'custom', 'd') . '/' . $test_file->getFilename(); $this->assertPathMatch($expected_filename, $node_file->getFileUri(), format_string('The file %file was uploaded to the correct path.', array('%file' => $node_file->getFileUri())));