- π¨π¦Canada jigarius MontrΓ©al
I wish the files were uploaded by default to a directory like "YYYY/MM" instead of "YYYY-MM". I'll see if I can find an open issue for that.
Drupal will upload files into one directory by default. Users can affect this by changing configuration of file/image fields, but real-world experience shows that they don't. Uploading thousands or millions of files into one directory is a very bad idea, which can have performance implications too. There are reports of sites going down just as a result of this issue.
Let's change default location configuration variable in file/image fields. This variable is currently empty, which results in all files being uploaded in a root folder (usually public://
). Since use of tokens is supported we can provide configuration that will dynamically adapt for different fields.
[field-storage:name]/[date:custom:Y]-[date:custom:m]
was preferred but couldn't make it in time for RC1 so we've decided to simplify the patch to minimize the disruption and file
π
Uploading files should have more robust default tokens
Closed: outdated
instead.
We're now going with [date:custom:Y]-[date:custom:m]
only for all fields. On top of that we've decided to upload user avatars under pictures/[date:custom:Y]-[date:custom:m]
and to remove file_directory: field/image
completely from field.field.user.user.user_picture.yml
since it would be duplicating what the default is anyway.
Site builders now see the default tokens in the File directory
field for files/images. This can still be completely customized to suite their needs.
None.
It is a well known fact that if you upload thousands of files into a single directory you will have performance issues on certain systems such as Cloud systems using GlusterFS, NFS or other shared filesystems or simply slow hard drives. The reason being that list operations on that single directory take too much overhead over network.
The solution typically is to ensure there is no more than a couple of thousands of files in a single directory in your files/. This can be easily achieved through dividing directories by date:
30/12/2013/file.jpg
29/12/2013/file2.jpg
https://drupal.org/project/filefield_paths provides this functionality but many people do not install it when they create their website and migration is complicated.
I propose that we automatically add date based tokens to all file system paths in Drupal core and allow modules such as FileField Paths to override these tokens to provide advanced functionality.
Fixed
7.0 β°οΈ
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
I wish the files were uploaded by default to a directory like "YYYY/MM" instead of "YYYY-MM". I'll see if I can find an open issue for that.