Loading...
 
Development

Development


Re: Cleanup for img/wiki_up and Proposed Structure

posts: 4656 Japan

> First, a question (both questions assume you have turned "ON" the image uploads and attachments options for wiki pages)...
>
> Is there any sort of cleanup script or methodology for dealing with orphaned files in img/wiki_up?

There is a "Removed unused pictures" link on the wiki admin page, but from what people say, it isn't too smart and tends to delete images still being used. I guess it's on the right track but apparently needs to be improved.

> I know when you upload a file as part of writing a page (an attachment, if you will) it gets stored there as the filename you upload it as. I was wondering what happens when the page gets deleted? I suspect nothing.

Right.

> Second question...
>
> Without doing manual upkeep, there is a very real potential for filename conflicts in img/wiki_up. Has there been discussion about modifying the attachment scripts to create subdirectories based on the page ID under img/wiki/up ?

There's nothing built-in. The solution has to be a consistent naming system for page authors, like ))PageOne_image1.png,PageOne_image2.png((, or with a timestamp, which I think somebody might have built into the image upload script at some Tiki site.

> How I utilize Tiki is as a departmental CMS, which includes numerous process documents (MOPs) that describe standard ways to do tasks, and also include numerous screenshot examples. Given uncreative people, I can see multitudes of "screenshot1.jpg" conflicting with each other. Having a separate subdirectory for each page that contains an attachment would eliminate this, and still allow folks to use those images in other pages.
>
> A more sophisticated clean-up tool would be required, but then I don't think we have one at all at the moment, that could look for files with deleted pages, and determine if any other pages reference them.

The existing "Remove unused pictures" might be a starting point for cleaning the wiki_up directory. And it doesn't seem like it'd be too hard to add something to the image upload script, like the way Firefox Snapshot screenshot files get a (Unix?) timestamp added to the name.

Personally, I like the way wiki_up images have human-readable names and wouldn't want to lose that, but adding the timestamp would be good.

-- Gary

There are no comments at this time.