Gallery3:Modules:webdav - Gallery Codex
Personal tools

Gallery3:Modules:webdav

From Gallery Codex

WebDAV

Upload, download and manage your photos over WebDAV.

Description

Adds a controller offering DAV access, thanks to SabreDAV. Will work correctly with many WebDAV clients, but write support is not working in all clients. All users have WebDAV access according to their Gallery 3 ACL's. Guest access is not enabled.

This code has currently seen fairly limited amounts of usage. The codebase is slim and fairly easy to audit, so security-wise, it should be OK (at least it's bharat-approved), but there might be issues with specific DAV clients. You have been warned.

Usage

Connect to DAV using
http://<yourgallery>/webdav/gallery

If your Gallery 3 install doesn't sport mod_rewrite support, don't forget to include index.php in your path. i.e

http://www.myowngallery.org/webdav/gallery (with mod_rewrite)
http://www.myowngallery.org/index.php/webdav/gallery (without mod_rewrite)

Clients known to work

Clients with issues

You can mount the DAV share in Finder, but Finder will treat it as a block device. This is a problem when writing, as Gallery 3 (rightly) doesn't like getting the file sent in multiple parts. It might be possible to write an abstraction layer to compensate for this, but no current plans exist.

  • Windows Explorer

Likely to have issues, see the SabreDAV wiki for details.

Anticipated FAQ:

Q: It doesn't work

A: Did you make sure to include index.php/ in your Gallery 3 path? (Only required if mod_rewrite support isn't enabled)

Q: Yes. Still doesn't work?

A: Any <Limits> directives (assuming Apache) limiting access to specific HTTP verbs? You need full access, GET/POST/HEAD isn't enough.

Q: It's slow

A: Yes. WebDAV isn't a speed demon to begin with. What you see is (likely) what you get.

Q: I can mount the DAV share in Finder, but it's read-only - what gives?

A: Finder makes some assumptions about the target - namely that it's handling files in the way a normal block file system would. The DAV module uses the database as a backend. I disabled the Locking module which in turn throws Finder into read-only mode. If you need write support from OSX, use Cyberduck (free) or Transmit (better - Transmit will even let you mount the volume much the same way Finder would)

Q: I can't mount my DAV shares in Windows Explorer, what gives?

A: If it works (which it supposedly might in Win7), there's probably quirks. You have been warned. Also see the SabreDAV page on Windows as a client.

Q: Any relation to the Gallery 2 WebDAV module?

A: No, it seemed easier to start fresh with a third party library to do all the plumbing. This has resulted in a fairly lean code base which should be simple to maintain.

Q: I can't see previews of my images in my webdav client

A: Mime type is not being returned by the server. Go to ${gallery3_home}/modules/webdav/controllers/webdav.php. After line $server->addPlugin($filter); add $server->addPlugin(new Sabre_DAV_Browser_GuessContentType()); Hopefully, this gets enabled in the next release.