[dokuwiki] Re: Would allowing upper case image names cause big problems?

  • From: Dmitry Katsubo <dma_k@xxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Thu, 9 Sep 2010 17:03:18 +0200

On 03.09.2010 15:58, Christopher Smith wrote:
> On 3 Sep 2010, at 14:47, Chris G wrote:
>> On Fri, Sep 03, 2010 at 10:54:09AM +0100, Christopher Smith wrote:
>>> On 3 Sep 2010, at 10:07, Chris G wrote:
>>>>
>>>> So, firstly *why* does Dokuwiki change everything to lower case and,
>>>> secondly, are there any realy big issues with getting Dokuwiki to
>>>> allow upper case media names?  All non-alphabetic characters can be
>>>> handled as at present, I only need to allow A-Z to stay unchanged.
>>>
>>> Dokuwiki insists on lower case names to ensure portability
>>> between case-sensitive and case-insensitive file systems.
>>
>>>> I can see several workarounds (other than allowing Dokuwiki to 'see'
>>>> uppper case names) many of which would be quite easy to implement but
>>>> nearly all would add an extra layer/step into my sharing strategy and
>>>> I want to keep things as simple as possible.
>>>
>>> If you're using *nix.  Make a script to mirror your photo
>>> directory using links (hard or symbolic), with the filenames
>>> converted to lowercase.  Link the mirrored directory into
>>> DokuWiki's media space.
>>>
>> Exactly the sort of workaround I'd thought of but it does involve that
>> extra, annoying, stage that I'd really like to aviod if I can. 
>> I'd have to either run the linking script using cron, say once a day,
>> which would mean just uploaded pictures wouldn't be immediately
>> available. Or I'd have to run it manually, which is just a nuisance.
>>
>> If I could persuade Dokuwiki to allow upper case image names then all
>> I'd have to do is: load pictures into photo software (which I do
>> already) and then add image links (or, more likely, gallery links)
>> from dokuwiki.  Adding a, probably, command line task to this sequence
>> is, while not that onerous, just annoying.
>>
> 
> I looked into that.  Right now there is no way to do it with plugins.
> There is one line, I think in media_search, where dw checks that the
> image file name matches the cleaned (no uppercase) version of the
> file name.  You could disable or modify that check.  I have no idea
> what side-effects there would be.

I also dream about this functionality. For example, I want to upload
media files (e.g. PDF documents) via FTP and I would like to preserve
all useful information in the filename:

Tutorial on the Semantic Web (Ivan Herman) [2009].pdf

I suppose, one can save the meta-information about the mediafile
somewhere separately (title, author, year, tags, ...) but I wonder how
easy is it to do with current codebase?

Anyway, if somebody can roll out an optional patch (or solution based on
configurable option) for DokuWiki to switch off lower-case restriction,
I will very appreciate that. I know about this plugin

http://www.dokuwiki.org/plugin:preservefilenames

but it needs to define 10 hooks to do the job... Crazy.

> Why only run the cron once a day?  Run it every couple of minutes.

-- 
With best regards,
Dmitry
-- 
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: