I am a novice user and trying to copy files from a Raspberry Pi to a Google Drive and generate a URL that can be shared. When I use the command:
rclone copy image.jpg gdrive:/Public2 --ignore-checksum
the image.jpg file overwrites the version in gdrive:/Public2, which is what I want to happen, but when I click on the shared URL, I get a message "Preview not available File is in owner's trash"
Is there a way to keep the URL the same when image.jpg is updated? I have a program that generates a new image.jpg every 5 minutes and don't want to keep changing the shared URL.
Or, am I using the wrong tool for this job?
Thanks.
What is your rclone version (output from rclone version)
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Which cloud storage system are you using? (eg Google Drive)
The command you were trying to run (eg rclone copy /tmp remote:tmp)
But if you use a web browser there is an option to upload a new version of a file as a replacement for the current one and the URL does not change. I had hoped that there was an option in rclone to do the same.
Thanks for the responses...I used the -v option and it worked intermittently until I realized that I wasn't giving Google Drive enough time to process the uploaded file. If I tried the shared URL immediately, I would get a message that the file was in the "owner's trash" -- but if I waited a few minutes (between 3-5 minutes) and retried, it worked. Presumably if I tried the shared URL immediately, Google Drive was still moving the original file to the trash before allowing the updated file to be accessed.
Ok...I guess I was premature in declaring victory. It is true that after uploading a new file, you have to wait a few minutes before accessing it via the shared URL, but I just setup a cron job to upload a new file (5 Mb jpg image file) every 10 minutes and everything was going along just great and I was able to access the newly uploaded files with the same shared URL. Then for some reason, after I stepped away for dinner, I noticed that it stopped working and the shared URL now displayed a message that the file was in the trash. I tried clearing the browser cache, used a new type of browser, etc. but no luck. The only way to resolve it was to create a new shared URL. I checked the google drive directory, and the date/time stamp shows the new file was successfully uploaded, but for some reason, when the old file is deleted (moved to trash), the shared URL is not correctly updating.
The files are 5 MB jpg files. I have an all sky camera based on a Raspberry Pi that takes an image every few minutes and I want to upload that to Google Drive and give people the URL to see the image.
The version of rclone is
rclone v1.54.1
os/arch: linux/arm
go version: go1.15.8
And the command I am using is
rclone copy -v –ignore-checksum ~/allsky/image.jpg gdrive:/AllSkyCam-Public2 (set to run every 10 minutes in crontab)
I kept monitoring the google drive and noticed that once, both the old and new file showed up and after a few minutes, the old file went away. Other times, the old file was gone by the time I refreshed the browser window. I did find a workaround....since I was trying to do with 3 different files (2 refresh daily, and one refreshes every 10 minutes), I just share the link for the directory that contains all 3 files. That link is stable...it means one extra mouse click, but it's worth it for the stability.
If you didn't mind paying a very small number of cents per month, you could push the files up to a public amazon s3 bucket and share URLs from there. These would be guaranteed to work. You could even upload a bit of html and put them into a web page.