Loading...
 
Features / Usability

Features / Usability


Re: Aw: Wiki attachments require unique filenames

posts: 13 United States

Indeed. The build up of stale files would be annoying. Though I can't see trusting a user base (or myself for that matter) to upload unique filenames site-wide.

I made some tweaks so now the file name md5 will be found based on the combination of the filename and the wiki page name it's uploaded to. I can have the same filename on a different page with no problem but if I upload a new file with the same name to a page where that filename already exists, it will replace it on the disk. So no stale files.

Also a tweak to wikilib.php makes the database record get updated if you upload the same filename to a given page instead of inserting a new record (which leaves the original record stale).

(If you keep wiki files in the database, you can have unlimited identical filenames on a given page. If you then convert these to filesystem storage though this patch won't prevent stale database records... and the last file you converted will be the only file on disk)

see attached

--Art

There are no comments at this time.

Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting