mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
switch rclone to owncloud mode so it sends lastmod
This commit is contained in:
parent
5ac2c20959
commit
24d8caaf3e
|
@ -46,7 +46,7 @@
|
||||||
<p><em>note: rclone-FTP is a bit faster, so {% if args.ftp or args.ftps %}try that first{% else %}consider enabling FTP in server settings{% endif %}</em></p>
|
<p><em>note: rclone-FTP is a bit faster, so {% if args.ftp or args.ftps %}try that first{% else %}consider enabling FTP in server settings{% endif %}</em></p>
|
||||||
<p>if you can, install <a href="https://winfsp.dev/rel/">winfsp</a>+<a href="https://downloads.rclone.org/rclone-current-windows-amd64.zip">rclone</a> and then paste this in cmd:</p>
|
<p>if you can, install <a href="https://winfsp.dev/rel/">winfsp</a>+<a href="https://downloads.rclone.org/rclone-current-windows-amd64.zip">rclone</a> and then paste this in cmd:</p>
|
||||||
<pre>
|
<pre>
|
||||||
rclone config create {{ aname }}-dav webdav url=http{{ s }}://{{ rip }}{{ hport }} vendor=other{% if accs %} user=k pass=<b>{{ pw }}</b>{% endif %}
|
rclone config create {{ aname }}-dav webdav url=http{{ s }}://{{ rip }}{{ hport }} vendor=owncloud{% if accs %} user=k pass=<b>{{ pw }}</b>{% endif %}
|
||||||
rclone mount --vfs-cache-mode writes --dir-cache-time 5s {{ aname }}-dav:{{ rvp }} <b>W:</b>
|
rclone mount --vfs-cache-mode writes --dir-cache-time 5s {{ aname }}-dav:{{ rvp }} <b>W:</b>
|
||||||
</pre>
|
</pre>
|
||||||
{% if s %}
|
{% if s %}
|
||||||
|
@ -71,7 +71,7 @@
|
||||||
</pre>
|
</pre>
|
||||||
<p>or you can use rclone instead, which is much slower but doesn't require root:</p>
|
<p>or you can use rclone instead, which is much slower but doesn't require root:</p>
|
||||||
<pre>
|
<pre>
|
||||||
rclone config create {{ aname }}-dav webdav url=http{{ s }}://{{ rip }}{{ hport }} vendor=other{% if accs %} user=k pass=<b>{{ pw }}</b>{% endif %}
|
rclone config create {{ aname }}-dav webdav url=http{{ s }}://{{ rip }}{{ hport }} vendor=owncloud{% if accs %} user=k pass=<b>{{ pw }}</b>{% endif %}
|
||||||
rclone mount --vfs-cache-mode writes --dir-cache-time 5s {{ aname }}-dav:{{ rvp }} <b>mp</b>
|
rclone mount --vfs-cache-mode writes --dir-cache-time 5s {{ aname }}-dav:{{ rvp }} <b>mp</b>
|
||||||
</pre>
|
</pre>
|
||||||
{% if s %}
|
{% if s %}
|
||||||
|
|
|
@ -22,7 +22,7 @@ replace `hunter2` with your password, or remove the `hunter2` lines if you allow
|
||||||
(
|
(
|
||||||
echo [cpp-rw]
|
echo [cpp-rw]
|
||||||
echo type = webdav
|
echo type = webdav
|
||||||
echo vendor = other
|
echo vendor = owncloud
|
||||||
echo url = http://127.0.0.1:3923/
|
echo url = http://127.0.0.1:3923/
|
||||||
echo headers = Cookie,cppwd=hunter2
|
echo headers = Cookie,cppwd=hunter2
|
||||||
echo(
|
echo(
|
||||||
|
@ -41,7 +41,7 @@ also install the windows dependencies: [winfsp](https://github.com/billziss-gh/w
|
||||||
cat > ~/.config/rclone/rclone.conf <<'EOF'
|
cat > ~/.config/rclone/rclone.conf <<'EOF'
|
||||||
[cpp-rw]
|
[cpp-rw]
|
||||||
type = webdav
|
type = webdav
|
||||||
vendor = other
|
vendor = owncloud
|
||||||
url = http://127.0.0.1:3923/
|
url = http://127.0.0.1:3923/
|
||||||
headers = Cookie,cppwd=hunter2
|
headers = Cookie,cppwd=hunter2
|
||||||
|
|
||||||
|
@ -70,3 +70,24 @@ feels out of place but is too good not to mention
|
||||||
rclone.exe serve http --read-only .
|
rclone.exe serve http --read-only .
|
||||||
rclone.exe serve webdav .
|
rclone.exe serve webdav .
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
# devnotes
|
||||||
|
|
||||||
|
copyparty supports and expects [the following](https://github.com/rclone/rclone/blob/46484022b08f8756050aa45505ea0db23e62df8b/backend/webdav/webdav.go#L575-L578) from rclone,
|
||||||
|
|
||||||
|
```go
|
||||||
|
case "owncloud":
|
||||||
|
f.canStream = true
|
||||||
|
f.precision = time.Second
|
||||||
|
f.useOCMtime = true
|
||||||
|
f.hasOCMD5 = true
|
||||||
|
f.hasOCSHA1 = true
|
||||||
|
```
|
||||||
|
|
||||||
|
notably,
|
||||||
|
* `useOCMtime` enables the `x-oc-mtime` header to retain mtime of uploads from rclone
|
||||||
|
* `canStream` is supported but not required by us
|
||||||
|
* `hasOCMD5` / `hasOCSHA1` is conveniently dontcare on both ends
|
||||||
|
|
||||||
|
there's a scary comment mentioning PROPSET of lastmodified which is not something we wish to support
|
||||||
|
|
Loading…
Reference in a new issue