Bug #26972
File extension of resources must be lower cased
Status: | Resolved | Start date: | 2011-05-21 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | Bastian Waidelich | % Done: | 100% |
|
Category: | Resource | |||
Target version: | - | |||
PHP Version: | Complexity: | |||
Has patch: | Affected Flow version: |
Description
When uploading a resource with upper case characters in the file extension (for instance "SomeFile.JPG") the saved persistent resource will be saved with a lower cased file extension ("<hash>.jpg"). This is correct, because it avoids clashes for two files with the same content (= same hash).Resource::getFileExtension()
already returns the lowercased extension, Resource::getFilename()
does not yet.
Related issues
Associated revisions
[+BUGFIX] Always lowercase file extensions in Resource
When uploading a resource with upper case characters in the
file extension (for instance "SomeFile.JPG") the saved
persistent resource will be saved with a lower cased file
extension ("<hash>.jpg"). This is correct, because it avoids
clashes for two files with the same content (= same hash).
This change makes sure that Resource::getFileName() also
contains the lowercased file extension.
Change-Id: I7b2a850e0302a03095b4e9ecb4e83bda6502b5c9
History
#1 Updated by Bastian Waidelich about 4 years ago
- Status changed from Accepted to Resolved
- % Done changed from 0 to 100
Applied in changeset 341ca7c74101f9c4f543d269df5ac790d8c21c04.