Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deep-dive/tigris.html.markerb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ order: 6

[Tigris](https://fly.io/docs/tigris/) is a globally distributed object storage service. It essentially requires no configuration, and seamlessly handles multi-regions. If you upload an audio file to a host in Virginia, you can access it from Amsterdam. Even better: subsequent accesses from regions other than the primary region are served locally.

Unlike relational databases, there may be reasons why you want to make your object store available via the internet. In this demo, the object store starts out private, but you can make it [public](/docs/tigris/#public-buckets) if you want.
Unlike relational databases, there may be reasons why you want to make your object store available via the internet. In this demo, the object store starts out private, but you can make it [public](/docs/tigris/#public-buckets) if you want. Public buckets serve objects without authentication at `https://bucket-name.t3.tigrisfiles.io/key-name`.

And if you happen to have an existing S3 object store, check out [shadow buckets](/docs/tigris/#migrating-to-tigris-with-shadow-buckets), which enable you to incrementally migrate your data.
8 changes: 7 additions & 1 deletion laravel/the-basics/laravel-tigris-file-storage.html.markerb
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,10 @@ Now that we have our Tigris Bucket, let's connect it with our Laravel app.
Storage::disk('s3')->put('example.txt', 'Contents');
}
```
Calling the function above should upload a new file in your bucket.
Calling the function above should upload a new file in your bucket.

## Serving public files

If your bucket is [public](/docs/tigris/#public-buckets), uploaded objects are accessible without authentication at `https://bucket-name.t3.tigrisfiles.io/key-name`. You can use this URL directly in your Blade templates for images, CSS, JavaScript, and other assets. No credentials or pre-signed URLs are needed.

For production use, we recommend setting up a [custom domain](https://www.tigrisdata.com/docs/buckets/custom-domain/) so your public URLs stay stable. See the [Tigris Public Bucket docs](https://www.tigrisdata.com/docs/buckets/public-bucket/) for details on all available public domains.
14 changes: 14 additions & 0 deletions partials/tigris/_tigris-storage-create.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,18 @@ You can also make a public bucket private.
fly storage update mybucket --private
```

Objects in a public bucket can be accessed by anyone without authentication. Public content is served from dedicated domains using the bucket name as a subdomain:

* `https://mybucket.t3.tigrisfiles.io/key-name` (primary)
* `https://mybucket.t3.tigrisbucket.io/key-name`
* `https://mybucket.t3.tigrisblob.io/key-name`

No credentials or pre-signed URLs are needed. For production use, we recommend setting up a custom domain so your public URLs stay stable:

```cmd
flyctl storage update mybucket --custom-domain assets.example.com
```

Then create a CNAME record for `assets.example.com` pointing to `mybucket.t3.tigrisbucket.io`. See the [Tigris Custom Domain docs](https://www.tigrisdata.com/docs/buckets/custom-domain/) for full setup instructions and the [Tigris Public Bucket docs](https://www.tigrisdata.com/docs/buckets/public-bucket/) for details on all available public domains.

Currently, buckets must be public or private. ACL settings will be ignored by the Tigris API.
Loading