Skip to main content

Common object operations in code

Applications generally use SDKs to:
  • Upload new objects
  • Download or stream objects
  • Delete obsolete data
  • Generate presigned URLs for temporary access

Example upload

import { PutObjectCommand } from "@aws-sdk/client-s3";

await client.send(
  new PutObjectCommand({
    Bucket: "your-bucket",
    Key: "uploads/example.txt",
    Body: "hello from Nubis Storage",
    ContentType: "text/plain",
  }),
);

Good practice

Treat object keys as part of your application contract so you do not create inconsistent prefixes over time.