What is the problem you are having with rclone?
Hello,
I can successfully upload files to Cloudflare R2.
BUT:
JavaScript files get uploaded (and are being served from R2 again) as text/javascript; charset=utf-8
According to MDN, this is NOT correct, it should be text/javascript
, without charset!
Is there a way to exclude information on charset
when copying files to Cloudflare R2?
Run the command 'rclone version' and share the full output of the command.
$ rclone version
rclone v1.65.1
- os/version: debian 12.4 (64 bit)
- os/kernel: 5.15.133.1-microsoft-standard-WSL2 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.21.5
- go/linking: static
- go/tags: none
Which cloud storage system are you using? (eg Google Drive)
Cloudflare R2
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
rclone copy base.js r2:(...)/
Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.
[r2]
type = s3
provider = Cloudflare
access_key_id = XXX
secret_access_key = XXX
region = auto
endpoint = https://XXX.r2.cloudflarestorage.com
acl = private
A log from the command that you were trying to run with the -vv
flag
2024/01/16 13:01:20 DEBUG : rclone: Version "v1.65.1" starting with parameters ["rclone" "copy" "base.js" "r2:(...)/" "-vv"]
2024/01/16 13:01:20 DEBUG : Creating backend with remote "base.js"
2024/01/16 13:01:20 DEBUG : Using config file from "/home/(...)/.config/rclone/rclone.conf"
2024/01/16 13:01:20 DEBUG : fs cache: adding new entry for parent of "base.js", "/home/(...)"
2024/01/16 13:01:20 DEBUG : Creating backend with remote "r2:(...)/"
2024/01/16 13:01:20 DEBUG : Resolving service "s3" region "auto"
2024/01/16 13:01:20 DEBUG : fs cache: renaming cache item "r2:(...)/" to be canonical "r2:(...)"
2024/01/16 13:01:20 DEBUG : base.js: Need to transfer - File not found at Destination
2024/01/16 13:01:21 DEBUG : base.js: md5 = 6fa9ed426c95e78154faf04e757e4b8d OK
2024/01/16 13:01:21 INFO : base.js: Copied (new)
2024/01/16 13:01:21 INFO :
Transferred: 142.801 KiB / 142.801 KiB, 100%, 142.797 KiB/s, ETA 0s
Transferred: 1 / 1, 100%
Elapsed time: 1.2s
2024/01/16 13:01:21 DEBUG : 7 go routines active