[WIP] Stardust storage docs#3084
Conversation
Appwrite WebsiteProject ID: Website (appwrite/website)Project ID: Tip Global CDN and DDoS protection come free with every Sites deployment |
Greptile SummaryThis PR adds a new S3 API documentation page for Appwrite Storage and wires it into the sidebar navigation under Guides. The page covers endpoint configuration, credential mapping, object key semantics (including the
Confidence Score: 4/5Safe to merge with one fix: the Go code snippet is missing its import block and won't compile as written. The Go client setup example omits the six required package imports that every other language snippet includes, so a Go developer copying it would get compile errors. The x-amz-server-side-encryption wording in the PutObject table could mislead users into thinking their objects are encrypted when the Limitations section indicates encryption configuration is not supported. Both issues are contained to the new documentation page and have no impact on the running application. src/routes/docs/products/storage/s3/+page.markdoc — the Go snippet and the PutObject table description warrant a second look before this page goes live. Important Files Changed
Prompt To Fix All With AIFix the following 2 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 2
src/routes/docs/products/storage/s3/+page.markdoc:74-76
The Go snippet is missing its `import` block. Every other language example in this multicode block includes the relevant import/use statements (JS has `import { S3Client }`, Python has `import boto3`, PHP has `use Aws\S3\S3Client`), so the Go snippet is inconsistent and won't compile as-is. The six packages used — `context`, `log`, `aws`, `config`, `credentials`, and `s3` — all need explicit imports in Go.
```suggestion
```go
// Go: aws-sdk-go-v2
import (
"context"
"log"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/credentials"
"github.com/aws/aws-sdk-go-v2/service/s3"
)
cfg, err := config.LoadDefaultConfig(context.TODO(),
```
### Issue 2 of 2
src/routes/docs/products/storage/s3/+page.markdoc:182
**`x-amz-server-side-encryption` contradicts Limitations**
The `PutObject` row says Appwrite "honors" `x-amz-server-side-encryption`, implying the header is acted upon. The Limitations section, however, lists "encryption configuration" as unsupported and returning `NotImplemented`. A reader uploading sensitive files with `x-amz-server-side-encryption: AES256` set could reasonably believe their objects are encrypted at rest via the S3 API when they are not. If the header is silently accepted for tooling compatibility (like ACLs), clarify that explicitly — e.g. "accepted for compatibility; does not enable server-side encryption."
Reviews (1): Last reviewed commit: "Simplify new docs" | Re-trigger Greptile |
| ```go | ||
| // Go: aws-sdk-go-v2 | ||
| cfg, err := config.LoadDefaultConfig(context.TODO(), |
There was a problem hiding this comment.
The Go snippet is missing its
import block. Every other language example in this multicode block includes the relevant import/use statements (JS has import { S3Client }, Python has import boto3, PHP has use Aws\S3\S3Client), so the Go snippet is inconsistent and won't compile as-is. The six packages used — context, log, aws, config, credentials, and s3 — all need explicit imports in Go.
| ```go | |
| // Go: aws-sdk-go-v2 | |
| cfg, err := config.LoadDefaultConfig(context.TODO(), | |
| ```go | |
| // Go: aws-sdk-go-v2 | |
| import ( | |
| "context" | |
| "log" | |
| "github.com/aws/aws-sdk-go-v2/aws" | |
| "github.com/aws/aws-sdk-go-v2/config" | |
| "github.com/aws/aws-sdk-go-v2/credentials" | |
| "github.com/aws/aws-sdk-go-v2/service/s3" | |
| ) | |
| cfg, err := config.LoadDefaultConfig(context.TODO(), |
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/routes/docs/products/storage/s3/+page.markdoc
Line: 74-76
Comment:
The Go snippet is missing its `import` block. Every other language example in this multicode block includes the relevant import/use statements (JS has `import { S3Client }`, Python has `import boto3`, PHP has `use Aws\S3\S3Client`), so the Go snippet is inconsistent and won't compile as-is. The six packages used — `context`, `log`, `aws`, `config`, `credentials`, and `s3` — all need explicit imports in Go.
```suggestion
```go
// Go: aws-sdk-go-v2
import (
"context"
"log"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/credentials"
"github.com/aws/aws-sdk-go-v2/service/s3"
)
cfg, err := config.LoadDefaultConfig(context.TODO(),
```
How can I resolve this? If you propose a fix, please make it concise.|
|
||
| | Operation | Description | | ||
| | --- | --- | | ||
| | `PutObject` | Upload an object. Returns an `ETag`. Honors `Content-Type`, `x-amz-meta-*` user metadata, and `x-amz-server-side-encryption`. | |
There was a problem hiding this comment.
x-amz-server-side-encryption contradicts Limitations
The PutObject row says Appwrite "honors" x-amz-server-side-encryption, implying the header is acted upon. The Limitations section, however, lists "encryption configuration" as unsupported and returning NotImplemented. A reader uploading sensitive files with x-amz-server-side-encryption: AES256 set could reasonably believe their objects are encrypted at rest via the S3 API when they are not. If the header is silently accepted for tooling compatibility (like ACLs), clarify that explicitly — e.g. "accepted for compatibility; does not enable server-side encryption."
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/routes/docs/products/storage/s3/+page.markdoc
Line: 182
Comment:
**`x-amz-server-side-encryption` contradicts Limitations**
The `PutObject` row says Appwrite "honors" `x-amz-server-side-encryption`, implying the header is acted upon. The Limitations section, however, lists "encryption configuration" as unsupported and returning `NotImplemented`. A reader uploading sensitive files with `x-amz-server-side-encryption: AES256` set could reasonably believe their objects are encrypted at rest via the S3 API when they are not. If the header is silently accepted for tooling compatibility (like ACLs), clarify that explicitly — e.g. "accepted for compatibility; does not enable server-side encryption."
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| {fileId}-{fileName} | ||
| ``` | ||
|
|
||
| For example, uploading to the key `reports/january.pdf` creates a file whose name is `reports/january.pdf`, and the object is then listed under a canonical key such as `6710e2...f3-reports/january.pdf`. |
There was a problem hiding this comment.
This and the info box below sounds a little confusing at first, can we simplify?
| - **Signature Version 4 only.** Requests are authenticated with SigV4, and the request timestamp must be within 15 minutes of the server's clock. | ||
| - **Reading back objects.** Reads, copies, overwrites, and deletes address objects by their canonical `{fileId}-{fileName}` key from a list operation, not by the raw key you uploaded with. See [Object key mapping](#object-key-mapping). | ||
| - **ACLs are compatibility responses.** `GetObjectAcl`, `PutObjectAcl`, `GetBucketAcl`, and `PutBucketAcl` return a canned private ACL and are accepted for tooling compatibility. They do not change access. Manage access with [Appwrite permissions](/docs/products/storage/permissions) and API key scopes instead. | ||
| - **Folders are not supported.** Uploading a folder marker (a key ending in `/`) returns `NotImplemented` (HTTP 501). Object keys can still contain `/`, so prefixes behave as expected. |
There was a problem hiding this comment.
We need to verify this


What does this PR do?
(Provide a description of what this PR does.)
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)
Related PRs and Issues
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)
Have you read the Contributing Guidelines on issues?
(Write your answer here.)