Bug #26972

File extension of resources must be lower cased

Added by Bastian Waidelich about 4 years ago. Updated about 4 years ago.

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

related to Conference Management - Bug #26965: Speaker profile: Image not found Resolved 2011-05-21

Associated revisions

Revision 341ca7c7
Added by Bastian Waidelich about 4 years ago

[+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.

Fixes #26972
Related #26965

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

Also available in: Atom PDF