Skip to content

Commit 0dfafe0

Browse files
authored
Add example on uploading to Source Cooperative with use_path_style=true (#119)
* Add example on uploading to Source Cooperative with use_path_style=true * add source.coop link
1 parent ebdf632 commit 0dfafe0

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

pmtiles/cli.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ Upload an archive to cloud storage.
190190
```bash
191191
# requires environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY credentials
192192
pmtiles upload INPUT.pmtiles REMOTE.pmtiles --bucket=s3://BUCKET_NAME
193+
# upload to a s3-compatible endpoint
194+
# some storage systems require path-style requests
195+
pmtiles upload INPUT.pmtiles REMOTE.pmtiles --bucket=s3://BUCKET_NAME?region=auto&endpoint=https://example.com&use_path_style=true
193196
```
194197

195198
You will need write permissions to the bucket, for example this AWS IAM policy:

pmtiles/cloud-storage.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,22 @@ In the **Bucket > Settings** of your Tigris bucket, scroll to **CORS Configurati
255255
- For **Allowed Methods** and **Allowed Headers**, choose or input `*`. This is required for preflight requests.
256256
- For **Expose Headers**, input `ETag`.
257257

258+
### Source Cooperative
259+
260+
[Source Cooperative](https://source.coop) is a publishing utility for open data operated by [Radiant Earth](https://radiant.earth/).
261+
262+
To upload PMTiles to Source Cooperative, use the [pmtiles cli](/pmtiles/cli).
263+
264+
On the **Manage** page of your source.coop repository, create an API key and find the **Access Key ID** and **Secret Access Key**.
265+
266+
Then use `pmtiles upload` to copy the file to Source's S3-compatible endpoint:
267+
268+
```sh
269+
export AWS_ACCESS_KEY_ID=YOUR_KEY
270+
export AWS_SECRET_ACCESS_KEY=YOUR_SECRET
271+
pmtiles upload file.pmtiles path/in/bucket/key.pmtiles --bucket=s3://ORGANIZATION_NAME?endpoint=https://data.source.coop&region=auto&use_path_style=true
272+
```
273+
258274
## Other Platforms
259275

260276
### GitHub Pages

0 commit comments

Comments
 (0)