https://bugzilla.wikimedia.org/show_bug.cgi?id=4421
Rob Lanphier (RobLa) <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #6680 is|0 |1 obsolete| | Attachment #6859 is|0 |1 obsolete| | --- Comment #34 from Rob Lanphier (RobLa) <[email protected]> 2009-12-15 18:26:29 UTC --- Created an attachment (id=6885) --> (https://bugzilla.wikimedia.org/attachment.cgi?id=6885) bug4421-robla-v3-svn59811.patch It's mostly working, though working through all of the edge cases is a bit of a game of whack-a-mole. Most of the complexity comes from needing to store the files on the filesystem with appropriate file extensions, since these get served directly from the filesystem from Apache. Thus, there's a lot of convoluted logic for tacking on the file extension in the appropriate spots. An example of something that isn't working that I need advice on is this: with my modified version, it's possible to upload a jpeg to a location without an extension, then upload a png to that same location. The problem comes in LocalFile::publish(). Here's the call it makes from that function: $status = $this->repo->publish( $srcPath, $dstRel, $archiveRel, $flags ); This causes two things to happen: 1. copy $dstRel to $archiveRel 2. copy $srcPath to $dstRel. The problem here is with uploading a png over the top of a jpg. For example, if the title name is "File:Foo", then the filename for the first version of the file will be "Foo.jpg", and the replacement will be "Foo.png". So, if we pass "Foo.jpg" to $dstRel, then step 1 works, but step 2 fails. If we pass "Foo.png", then the opposite problem occurs. Thoughts on dealing with this problem? It would seem that modifying FileRepo::publish() (or adding a new method with more parameters) seems like the only solution here. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
