import z from"@contractspec/lib.ui-link";import{ChevronRight as A}from"lucide-react";import{jsx as q,jsxs as y}from"react/jsx-runtime";function E(){return y("div",{className:"space-y-8",children:[y("div",{className:"space-y-4",children:[q("h1",{className:"font-bold text-4xl",children:"S3-Compatible Storage"}),q("p",{className:"text-muted-foreground",children:"Store files, images, and documents using any S3-compatible object storage service including AWS S3, Scaleway Object Storage, MinIO, DigitalOcean Spaces, and more."})]}),y("div",{className:"space-y-4",children:[q("h2",{className:"font-bold text-2xl",children:"Setup"}),q("div",{className:"overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",children:q("pre",{children:`# .env
S3_ENDPOINT=https://s3.fr-par.scw.cloud
S3_ACCESS_KEY_ID=...
S3_SECRET_ACCESS_KEY=...
S3_BUCKET=my-bucket
S3_REGION=fr-par`})})]}),y("div",{className:"space-y-4",children:[q("h2",{className:"font-bold text-2xl",children:"Uploading files"}),q("div",{className:"overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",children:q("pre",{children:`capabilityId: s3-upload
provider:
  type: s3
  operation: upload

inputs:
  key:
    type: string
    description: "File path in bucket"
  file:
    type: file
  contentType:
    type: string
    optional: true
  metadata:
    type: object
    optional: true

outputs:
  url:
    type: string
  etag:
    type: string`})})]}),y("div",{className:"space-y-4",children:[q("h2",{className:"font-bold text-2xl",children:"Generating presigned URLs"}),q("div",{className:"overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",children:q("pre",{children:`capabilityId: s3-presigned-url
provider:
  type: s3
  operation: getPresignedUrl

inputs:
  key:
    type: string
  expiresIn:
    type: number
    default: 3600
    description: "Expiration in seconds"

outputs:
  url:
    type: string`})})]}),y("div",{className:"space-y-4",children:[q("h2",{className:"font-bold text-2xl",children:"Best practices"}),y("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[q("li",{children:"Use presigned URLs for secure, temporary access"}),q("li",{children:"Set appropriate CORS policies for browser uploads"}),q("li",{children:"Enable versioning for important files"}),q("li",{children:"Use lifecycle policies to archive old files"}),q("li",{children:"Organize files with a clear key structure"})]})]}),y("div",{className:"flex items-center gap-4 pt-4",children:[q(z,{href:"/docs/integrations/qdrant",className:"btn-ghost",children:"Previous: Qdrant"}),y(z,{href:"/docs/integrations/twilio",className:"btn-primary",children:["Next: Twilio ",q(A,{size:16})]})]})]})}export{E as IntegrationsS3Page};
