Summary: allow upper-case file extensions in attachments
Created: 2005-02-02 16:55
Status: Closed - added for 2.0.beta28
Description: Attachments should allow and recognize uppercase file extensions.
Question: Should PmWiki convert uppercase file extensions to lowercase, or simply leave them "as-is"?
Could it be a checkbox, like
[*] Convert the file's extension to lower case
so people can decide when they are uploading? Converting to lower case makes more sense to me because it would help avoid unintentional uploading of multiple versions of the same file. -Hagan
Speaking from an environment where uppercasing is commonly used in filenames and extensions by students in their media files (Georgia Tech) it would make pmwiki much more attractive to them (this is the reason we stopped using DokuWiki--as it must convert uppercasing in names and extensions). -Mark
I don't see any point for wanting upload file extensions to be case sensitive ? Forcing it systematically to lower case would avoid a quite frequent mistake and make things easier for the average user by taking care of it for him. On my implementation, I force the extension to lower case by inserting a line in MakeUploadName():
$x = preg_replace("/([^.]+)$/e", "''.strtolower('\\1').''", $x);
I believe enforcing lower case attachments (by automatic conversion, not by rejection of non-compliant upload attempts) would be perfectly in line with the PmWikiPhilosophy of keeping things simple for naive authors.
(I don't see any functional gain from upper case extensions at all. Could be because I'm operating in a case-insensitive environment, I admit.)
--Henning March 17, 2005, at 11:21 AM
This is what the Minimage module do, it allows upper or mixed case in attachment extension text writing, but always store in lower case on the harddrive. PRZ
2.0.beta28 now forces extensions to lowercase.
This now creates a problem for attachment links to files with capitalized extensions that were ftp-uploaded. For example, if you upload a picture (foo.JPG) via ftp to your uploads folder, then link it with the code