Dokümantasyon

Depolama

Bucket/object. Public URL’de proje id yok.

URL’ler

Yazma: {EDGE}/storage/objects/{bucket}/{key}

Public: {EDGE}/storage/objects/{bucket}/{shortId}

Boyut: ?w= & ?h= veya ?g=. Scope: storage:read / storage:write.

MethodPathAçıklama
GET/storage/bucketsBucket listesi
POST/storage/bucketsBucket oluştur
DELETE/storage/buckets/{bucket}Bucket sil (204)
GET/storage/objects/{bucket}?prefix=Object listele
PUT/storage/objects/{bucket}/{key}Yükle (raw body)
GET/storage/objects/{bucket}/{key}İndir
DELETE/storage/objects/{bucket}/{key}Object sil
POST/storage/signed/{bucket}/{key}İmzalı URL
GET/storage/objects/{bucket}/{shortId}Public URL (auth yok)
GET/{shortId}Eski kısa URL
POST/storage/multipartMultipart başlat
GET/uploadUpload iframe

Yükleme + public URL

Node.js
import { readFileSync } from 'fs'
const base = EDGE
const body = readFileSync('./hero.png')

const up = await fetch(`${EDGE}/storage/objects/data/hero.png`, {
  method: 'PUT',
  headers: { 'X-Liap-Key': API_KEY, 'Content-Type': 'image/png' },
  body,
}).then(r => r.json())

const publicUrl = `${EDGE}/storage/objects/data/${up.id}`
console.log(publicUrl, `${publicUrl}?w=400`)

Docs · API