@@ -5,19 +5,71 @@ sidebar:
55 order : 1
66---
77
8+ import { Steps } from " ~/components"
9+
810You can upload objects to your bucket from the Cloudflare dashboard or using the Wrangler.
911
1012## Upload objects via the Cloudflare dashboard
1113
1214To upload objects to your bucket from the Cloudflare dashboard:
1315
16+ <Steps >
14171 . Log in to the [ Cloudflare dashboard] ( https://dash.cloudflare.com ) and select ** R2** .
15182 . From the ** R2** page in the dashboard, locate and select your bucket.
16193 . Select ** Upload** .
17204 . Choose to either drag and drop your file into the upload area or ** select from computer** .
21+ </Steps >
1822
1923You will receive a confirmation message after a successful upload.
2024
25+ ## Upload objects via Rclone
26+
27+ Rclone is a command-line tool which manages files on cloud storage. You can use Rclone to upload objects to R2.
28+
29+ :::note
30+ Use Rclone if you wish to upload multiple objects to R2.
31+
32+ Cloudflare dashboard only allows you to upload one object at a time.
33+ :::
34+
35+ ### 1. Configure Rclone by running ` rclone config `
36+
37+ First, configure your Rclone with the following settings.
38+
39+ <Steps >
40+ 1 . Create new remote by selecting ` n ` .
41+ 2 . Select a name for the new remote. For example, use ` r2 ` .
42+ 3 . Select the ` Amazon S3 Compliant Storage Providers ` storage type.
43+ 4 . Select ` Cloudflare R2 storage ` for the provider.
44+ 5 . Select whether you would like to enter AWS credentials manually, or get it from the runtime environment.
45+ 6 . Enter the AWS Access Key ID.
46+ 7 . Enter AWS Secret Access Key (password).
47+ 8 . Select the region to connect to (optional).
48+ 9 . Select the S3 API endpoint.
49+ </Steps >
50+
51+ ### 2. Upload files to R2
52+
53+ Upload your files to R2.
54+
55+ ``` sh
56+ # Upload a single file.
57+ # Specify the target bucket with this syntax: <remote name>:<bucket name>
58+ # In this example, <remote name> is 'r2'
59+ rclone copy /path/to/local/file.txt r2:bucket_name
60+
61+ # Upload everything in a directory
62+ rclone copy /path/to/local/folder r2:bucket_name
63+ ```
64+
65+ ### 3. Verify successful upload
66+
67+ Verify that your files have been uploaded by listing the objects stored in the destination R2 bucket.
68+
69+ ``` sh
70+ rclone ls r2:bucket_name
71+ ```
72+
2173## Upload objects via Wrangler
2274
2375:::note
0 commit comments