Running custom script before handling WebDAV request

What is the problem you are having with rclone?

More of a question than a problem. I'm trying to use rclone as a bootleg short-lived WebDAV server to access Zotero storage from my computer on the Zotero iOS app. The Zotero app incorporates a WebDAV client for achieving this.

It looks like the client actually requests a compressed (.zip) format of the directory which does not exist in the file system. E.g., in the logs you can see it requests The directory 2ZWG8DVK exists and actually contains the necessary file.

My question is: is there any sort of pre-request-handle hook that I can plug into rclone to zip the directory right before rclone handles the request? Otherwise I guess I can just .zip everything everytime I run the server.

Run the command 'rclone version' and share the full output of the command.

rclone v1.59.0
- os/version: arch "rolling" (64 bit)
- os/kernel: 5.18.16-arch1-1 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.18.3
- go/linking: dynamic
- go/tags: none

Which cloud storage system are you using? (eg Google Drive)

None / the file system.

The command you were trying to run

rclone -vv serve webdav --addr --baseurl "/zotero" --user yyy --pass xxx storage/

The rclone config contents with secrets removed.


A log from the command with the -vv flag

<7>DEBUG : rclone: Version "v1.59.0" starting with parameters ["rclone" "-vv" "serve" "webdav" "--addr" "" "--baseurl" "/zotero" "--user" "yyy" "--pass" "xxx" "storage/"]
<7>DEBUG : rclone: systemd logging support activated
<7>DEBUG : Creating backend with remote "storage/"
<7>DEBUG : Using config file from "/home/yyy/.config/rclone/rclone.conf"
<7>DEBUG : fs cache: renaming cache item "storage/" to be canonical "/home/yyy/Zotero/storage"
<6>INFO  : Local file system at /home/yyy/Zotero/storage: poll-interval is not supported by this remote
<6>INFO  : Using --user yyy --pass XXXX as authenticated user
<5>NOTICE: Local file system at /home/yyy/Zotero/storage: WebDav Server started on
<7>DEBUG : / OpenFile: flags=O_RDONLY, perm=----------
<7>DEBUG : / >OpenFile: fd=<nil>, err=file does not exist
<6>INFO  : /zotero/ GET from

There isn't anyway to do that in rclone that I'm aware of.

You'd have to build an action prior to the rclone serve I'd imagine as you suggested.

I see. Thanks for taking the time to answer.

This would need a patch to rclone to implement this I think.

It would be interesting to see what headers the client sends - maybe this is some standardish webdav extension?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.