This is a re-post from my MySpace blog.
UPDATE 1: While I haven’t tested it this bug appears to be fixed as of 2007-06-11.
UPDATE 2: SourceForge uses better urls now. Not sure when this was changed.
I thought I would download the new Gallery 2.2.1 and use webDav. They need better setup instructions. Basically do the following and you will get webDav working:
- Activate the webDav module in the Site Admin;
- Acitvate the URL rewriting plugin.
It should be working, if not there are other issues, these solved mine.
The other problem was Gnome 2.16.2 PUTs an empty file on the server first, and then replaces it with the new image. This caused problems with Gallery2 not creating a thumbnail. Apparently this also happens with OS X’s webDavFS as well, http://sourceforge.net/tracker/index.php?func=detail&aid=1681406&group_id=7130&atid=107130. (SourceForge should make that MUCH more user friendly, or at least search engine friendly). While I submitted it as a comment to the tracker, I’m sure someone will be like “you idiot” I don’t care about them, this should make people happy to use the native webDav that their window manager uses, in my case Gnome.
The diff below solved my problem, despite the fact I have little clue how to make a meaningful diff for others to use. Except now I have a “File” instead of a “photo”, I could care less about the semantics because I have the thumbnails.
--- gallery2.orig/modules/webdav/ItemAddWebDav.inc Sun Apr 8 10:34:41 2007 +++ gallery2/modules/webdav/ItemAddWebDav.inc Sun Apr 8 10:37:04 2007 @@ -109,6 +109,9 @@ $platform->fclose($handle); + // double check the mimeType of the file that was uploaded + list ($nothing, $mimeType) = GalleryMimeTypeHelper_simple::getMimeType($tmpFile); + list ($ret, $mimeExtensions) = GalleryCoreApi::convertMimeToExtensions($mimeType); if ($mimeType == 'application/octet-stream' || $mimeType == 'application/unknown' @@ -187,6 +190,9 @@ GalleryCoreApi::releaseLocks($lockIds); return array($ret, null, null); } + + // double check the mimeType of the file that was uploaded + list ($nothing, $mimeType) = GalleryMimeTypeHelper_simple::getMimeType($filePath); $item->setMimeType($mimeType);