Developer Integration & S3 Usage Guide
Pixaware Private S3 provides an AWS S3-compatible object storage API backed by SeaweedFS on dedicated RAID storage and proxied securely via HTTPS. Connect existing Node.js, Next.js, Python, PHP, or CLI applications using standard AWS SDKs with AWS Signature Version 4.
S3 API Endpoint
https://s3.pixaware.co
Region
us-east-1
Addressing Style
forcePathStyle: true
https://s3.pixaware.co/<bucket>/<key>. Virtual-hosted style is disabled.Admin Console
admin.s3.pixaware.co
Quick Onboarding Workflow
Follow these 4 steps when connecting a new Pixaware application.
- Create/Select Project: Ensure your app has a project entry (e.g.,
QuikApp,ClinicDesk,Pixaware Website) in the Admin Console. - Provision Bucket: Create a bucket under that project (keep visibility
PRIVATEunless public CDN read is explicitly required). - Generate Scoped Access Key: Issue an access key scoped strictly to that bucket (
READ_WRITE,READ_ONLY, orWRITE_ONLY). Copy the secret once; wait ~5s for key sync. - Configure `.env`: Never commit keys to Git. Inject them via environment variables as shown on the right.
PIXAWARE_S3_ENDPOINT="https://s3.pixaware.co" PIXAWARE_S3_REGION="us-east-1" PIXAWARE_S3_BUCKET="your-project-bucket" PIXAWARE_S3_ACCESS_KEY="PXW_YOUR_ACCESS_KEY_ID" PIXAWARE_S3_SECRET_KEY="YOUR_SECRET_ACCESS_KEY"
SDK & CLI Code Examples
Standard AWS SDK integration snippets configured for path-style addressing.
// npm install @aws-sdk/client-s3 @aws-sdk/s3-request-presigner
import {
S3Client,
PutObjectCommand,
GetObjectCommand,
ListObjectsV2Command,
DeleteObjectCommand,
} from "@aws-sdk/client-s3";
import { getSignedUrl } from "@aws-sdk/s3-request-presigner";
export const s3 = new S3Client({
endpoint: process.env.PIXAWARE_S3_ENDPOINT!, // https://s3.pixaware.co
region: process.env.PIXAWARE_S3_REGION || "us-east-1",
forcePathStyle: true, // REQUIRED for path-style addressing
credentials: {
accessKeyId: process.env.PIXAWARE_S3_ACCESS_KEY!,
secretAccessKey: process.env.PIXAWARE_S3_SECRET_KEY!,
},
});
// 1. Upload an object
await s3.send(
new PutObjectCommand({
Bucket: process.env.PIXAWARE_S3_BUCKET!,
Key: "uploads/2026/document.pdf",
Body: fileBuffer,
ContentType: "application/pdf",
})
);
// 2. List objects under a folder prefix
const list = await s3.send(
new ListObjectsV2Command({
Bucket: process.env.PIXAWARE_S3_BUCKET!,
Prefix: "uploads/2026/",
Delimiter: "/",
MaxKeys: 100,
})
);
// 3. Download an object as a Buffer or stream
const res = await s3.send(
new GetObjectCommand({
Bucket: process.env.PIXAWARE_S3_BUCKET!,
Key: "uploads/2026/document.pdf",
})
);
const bytes = await res.Body?.transformToByteArray();
// 4. Generate a 15-minute presigned download URL
const downloadUrl = await getSignedUrl(
s3,
new GetObjectCommand({
Bucket: process.env.PIXAWARE_S3_BUCKET!,
Key: "uploads/2026/document.pdf",
}),
{ expiresIn: 900 }
);
// 5. Delete an object
await s3.send(
new DeleteObjectCommand({
Bucket: process.env.PIXAWARE_S3_BUCKET!,
Key: "uploads/2026/document.pdf",
})
);Large File Multipart Uploads (≥ 10 MB)
// For files > 10 MB, use @aws-sdk/lib-storage (automatic multipart) or S3 Multipart commands
// npm install @aws-sdk/lib-storage
import { Upload } from "@aws-sdk/lib-storage";
import { createReadStream } from "node:fs";
const upload = new Upload({
client: s3,
params: {
Bucket: process.env.PIXAWARE_S3_BUCKET!,
Key: "backups/db-dump.sql.gz",
Body: createReadStream("/tmp/db-dump.sql.gz"),
ContentType: "application/gzip",
},
partSize: 5 * 1024 * 1024, // 5 MB chunks
queueSize: 4,
});
await upload.done();Developer Best Practices
1. Stream or Presign Large Files: Never buffer large user uploads through your Next.js/Express server RAM. Request a presigned PUT URL from your backend and upload directly from the browser to https://s3.pixaware.co.
2. Enforce Least-Privilege Keys: Create separate access keys per app environment (staging vs production) scoped only to that app's bucket. Avoid using global admin keys in app code.
3. Sanitize Object Keys: Never pass raw user filenames directly as S3 keys. Prefix with entity IDs or UUIDs (e.g., tenants/42/invoices/uuid-name.pdf) and reject .. path segments.
4. Use Presigned GET for Private Data: Keep sensitive documents in PRIVATE buckets and generate short-lived presigned URLs (5–15 minutes) after checking user authorization in your app.
S3 Compatibility Matrix
Verified against SeaweedFS S3 Gateway behind https://s3.pixaware.co.
Common Errors & Troubleshooting
Ensure forcePathStyle: true and region: "us-east-1" are set, and make sure the Content-Type header sent during a browser presigned PUT matches the ContentType passed to PutObjectCommand.
Verify the key is active, not expired, and granted permission to the target bucket in Admin Console → Access Keys. Newly created keys take ~5 seconds to sync.
Use Multipart Upload (5 MB chunks) for large files and confirm the VPS Nginx vhost for s3.pixaware.co sets client_max_body_size 0; and proxy_request_buffering off;.
Indicates the Storage PC or reverse tunnel is offline. Check https://admin.s3.pixaware.co/api/health and run ./storage-client/status.sh on the Storage PC.