I’m trying to make chunked uploading work in Docker in particular nextcloud:latest
.
This is so I can add a chunked upload feature to rclone and have it tested in the integration tests.
I’m pulling my hair out though, I just can’t get it to work.
I wrote two small scripts so anyone should be able to reproduce this - first start the container
#!/bin/bash
set -e
NAME=nextcloud-test
USER=rclone
PASS=ArmorAbleMale6
docker run --rm -d --name $NAME \
-e "SQLITE_DATABASE=nextcloud.db" \
-e "NEXTCLOUD_ADMIN_USER=rclone" \
-e "NEXTCLOUD_ADMIN_PASSWORD=$PASS" \
-e "NEXTCLOUD_TRUSTED_DOMAINS=*.*.*.*" \
-p 127.0.0.1:3080:80 \
nextcloud:latest
Now do the chunked upload. This is lifted almost straight from the docs:
#!/bin/bash
truncate -s 10M chunk1
truncate -s 15728639 chunk2
AUTH='-u rclone:ArmorAbleMale6'
SERVER='http://127.0.0.1:3080/remote.php/webdav'
echo "mkdir"
curl -X MKCOL $AUTH ${SERVER}/myapp-e1663913-4423-4efe-a9cd-26e7beeca3c0
echo "chunk1"
curl -X PUT $AUTH ${SERVER}/myapp-e1663913-4423-4efe-a9cd-26e7beeca3c0/000000000000000-000000010485759 -d @chunk1
echo "chunk2"
curl -X PUT $AUTH ${SERVER}/myapp-e1663913-4423-4efe-a9cd-26e7beeca3c0/000000010485760-000000015728640 -d @chunk2
echo "assemble"
curl -X MOVE $AUTH --header "Destination:${SERVER}/file.zip" ${SERVER}/myapp-e1663913-4423-4efe-a9cd-26e7beeca3c0/.file
echo "delete"
curl -X DELETE $AUTH ${SERVER}/myapp-e1663913-4423-4efe-a9cd-26e7beeca3c0/
Running that script gives the output
$ ./test-chunked.sh
mkdir
chunk1
chunk2
assemble
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
<s:exception>Sabre\DAV\Exception\NotFound</s:exception>
<s:message>File with name myapp-e1663913-4423-4efe-a9cd-26e7beeca3c0/.file could not be located</s:message>
</d:error>
delete
The same thing happens when I try the new rclone code - the .file
is not found.
Any ideas?
Is this a bug?