Api upload to google photos failed

What is the problem you are having with rclone?

rclone copy googlelogo_color_272x92dp.png gphotos:album/Uploads works
curl -X POST "http://127.0.0.1:5572/operations/copyfile?srcFs=/&srcRemote=/home/user/googlelogo_color_272x92dp.png&dstFs=gphotos:&dstRemote=album/Uploads" failed

What is your rclone version (output from rclone version)

rclone v1.52.1

Which OS you are using and how many bits (eg Windows 7, 64 bit)

debian 10 64bit

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

google photos

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone rcd  --rc-no-auth  --rc-serve

curl -X POST  "http://127.0.0.1:5572/operations/copyfile?srcFs=/&srcRemote=/home/user/googlelogo_color_272x92dp.png&dstFs=gphotos:&dstRemote=album/Uploads"  

The rclone config contents with secrets removed.

Paste config here

A log from the command with the -vv flag

{
        "error": "can't upload files here",
        "input": {
                "dstFs": "gphotos:",
                "dstRemote": "album/Uploads",
                "srcFs": "/",
                "srcRemote": "/home/user/googlelogo_color_272x92dp.png"
        },
        "path": "operations/copyfile",
        "status": 500
}

Can you run this with -vv and post the log that is output when you do your curl?

2020/06/18 12:49:01 DEBUG : rclone: Version "v1.52.1" starting with parameters ["rclone" "rcd" "--rc-no-auth" "--rc-serve" "-vv"]
2020/06/18 12:49:01 NOTICE: Serving remote control on http://127.0.0.1:5572/
2020/06/18 12:50:02 DEBUG : rc: "operations/copyfile": with parameters map[dstFs:gphotos: dstRemote:album/upload srcFs:/ srcRemote:/home/user/googlelogo_color_272x92dp.png]
2020/06/18 12:50:02 DEBUG : Google Photos path "": NewObject: remote="album/upload"
2020/06/18 12:50:02 DEBUG : Google Photos path "": >NewObject:
2020/06/18 12:50:02 DEBUG :/home/user/googlelogo_color_272x92dp.png: Need to transfer - File not found at Destination
2020/06/18 12:50:02 DEBUG : Google Photos path "": Put: src=/home/user/googlelogo_color_272x92dp.png
2020/06/18 12:50:02 DEBUG : album/upload: Update: src=/home/user/googlelogo_color_272x92dp.png
2020/06/18 12:50:02 DEBUG : album/upload: >Update: err=can't upload files here
2020/06/18 12:50:02 DEBUG : Google Photos path "": >Put:
2020/06/18 12:50:02 ERROR : /home/user/googlelogo_color_272x92dp.png: Failed to copy: can't upload files here
2020/06/18 12:50:02 ERROR : rc: "operations/copyfile": error: can't upload files here

Oh, I see the problem...

This needs to say

            "dstRemote": "album/Uploads/googlelogo_color_272x92dp.png",

So you need to modify your curl like this

curl -X POST  "http://127.0.0.1:5572/operations/copyfile?srcFs=/&srcRemote=/home/user/googlelogo_color_272x92dp.png&dstFs=gphotos:&dstRemote=album/Uploads/googlelogo_color_272x92dp.png"
1 Like

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