00599: Disabling direct downloads affects upload versioning: Old versions not downloadable
Description: Disabling direct downloads affects upload versioning (from 00386). Old versions are not downloadable, I suppose because the , character separating file name and timestamp breaks the argument string. The result is a 404 error.
Argument string generated by PmWiki:
I guess replacing the separating , by a separating . might fix the problem (for new uploads, but I have only example files up so far anyway).
(There was no problem with direct downloads, but due to 00588 I had to disable those.)
--Henning November 18, 2005, at 12:04 PM
The problem is that PmWiki is trying to "clean" the upload name before sending the file, and since ".txt,1126526456" isn't considered a valid extension, it's returning a 404 error. I'll have to think about that one. Better would probably be for me to fix 00588. :-)
Hm, I just renamed on the files on the server to
(replacing the comma with a period), and this gave me a correct download. Could I introduce the same replacement in the timestamp appending code, or would that generate unwanted side effects?
By the way, this PITS hit me in a meeting just when I was saying "And now I'm going to demonstrate how we are going to use PmWiki as an elegant replacement for our old, unloved documentation management system".
Fortunately, PmWiki enjoys such a good reputation with my colleagues that I could simply say "Now imagine this had worked ...", and no one doubted it will work when we need it :-)
--Henning November 22, 2005, at 07:18 AM
I just tried changing upload.php to generate a "." instead of a "," separation of extension and timestamp, and it appeared to work in permitting downloads of the old file version. Are there any possible side effects or can I use this confidently as a workaround until 00588 is fixed? :-) --Henning June 06, 2006, at 10:07 AM
See Cookbook.Attachtable for a fix: a new action
downloaddeleted that correctly parses the
filename,timestamp format of deleted files and serves them with the proper MIME type, as well as an attachlist replacement that links the deleted files correctly. --EemeliAro November 27, 2007, at 06:24 PM