Aurabase Logosu
aura tabanıdokümanlar
dokümanlar›JavaScript SDK reference›Storage reference

JavaScript SDK'sı: depolama referansı

Kovaları ve nesneleri yöneten her yöntem kendi imzasıyla.

6 dk. oku·Seviye referans·12 Eki 2026 tarihinde revize edildi
Bu İngilizce metin, Fransızca orijinalinden otomatik olarak oluşturulmuştur ve henüz incelenmemiştir.
Bu sayfa otomatik olarak çevrildi. İngilizce versiyonu yetkilidir.
#
Sınıf

Depolama Hizmeti

YöntemAçıklama
from(bucketId: string): StorageBucketClientBelirli bir gruba (DX eşlik Supabase) kapsamı belirlenmiş bir istemciyi döndürür.
listBuckets(): Promise<AuraResponse<StorageBucket[]>>Proje paketlerini listeleyin.
getBucket(id: string): Promise<AuraResponse<StorageBucket>>Bir kovayı tanımlayıcısına göre okur.
createBucket(name: string, options?: { public?: boolean; fileSizeLimit?: number; allowedMimeTypes?: string[]; }): Promise<AuraResponse<StorageBucket>>Bir kova oluşturun. public (varsayılan false) nesnelerinin kimlik doğrulaması gerekmeden okunabilir olmasını sağlar; fileSizeLimit (bayt olarak) ve allowedMimeTypes kabul edilen dosyaları sınırlar.
updateBucket(id: string, options?: { public?: boolean; fileSizeLimit?: number; allowedMimeTypes?: string[]; }): Promise<AuraResponse<StorageBucket>>Mevcut bir paketi günceller (KISMI güncelleme: yalnızca sağlanan alanlar gönderilir).
deleteBucket(id: string): Promise<AuraResponse<null>>Bir paketi tanımlayıcısına göre siler.
upload(bucketId: string, path: string, file: Blob | File | ArrayBuffer, options?: { contentType?: string; upsert?: boolean; metadata?: Record<string, string>; }): Promise<AuraResponse<UploadResult>>Bir dosyayı bir pakete yükleyin.
download(bucketId: string, path: string, options?: { transform?: ImageTransform; }): BlobDownloadBuilderBir dosyanın tembel indirilmesi.
list(bucketId: string, options?: { prefix?: string; limit?: number; offset?: number; cursor?: string; }): Promise<AuraResponse<FileEntry[]>>Dosyaları bir pakette listeleyin.
remove(bucketId: string, paths: string[], options?: { permanent?: boolean; }): Promise<AuraResponse<null>>Bir paketten bir veya daha fazla dosyayı silin.
copy(bucketId: string, fromPath: string, toPath: string): Promise<AuraResponse<{ key: string; }>>Bir paketin içindeki bir dosyayı kopyalayın.
move(bucketId: string, fromPath: string, toPath: string): Promise<AuraResponse<{ key: string; }>>Bir dosyayı paket içinde taşıyın/yeniden adlandırın.
getMetadata(bucketId: string, path: string): Promise<AuraResponse<ObjectMeta>>Dosya meta verilerini alın.
createSignedUrl(bucketId: string, path: string, expiresInSeconds?: number, options?: { transform?: ImageTransform; }): Promise<AuraResponse<{ url: string; expires_in: number; }>>İmzalı (geçici) bir indirme URL'si oluşturun.
createSignedUrls(bucketId: string, paths: string[], expiresInSeconds?: number, options?: { transform?: ImageTransform; }): Promise<AuraResponse<Array<{ path: string; url: string; expires_in: number; } | { path: string; error: AuraError; }>>>Tek geçişte (toplu olarak) birden fazla imzalı URL oluşturur.
createSignedUploadUrl(bucketId: string, path: string, expiresInSeconds?: number, options?: { upsert?: boolean; }): Promise<AuraResponse<{ url: string; expires_in: number; }>>İmzalı bir yükleme URL'si (önceden imzalanmış PUT) oluşturun.
getPublicUrl(bucketId: string, path: string, options?: { transform?: ImageTransform; }): stringPaketteki bir dosyanın URL'sini oluşturur.
#
Sınıf

DepolamaBucketClient

Belirli bir pakete (DX eşliği Supabase) kapsamındaki istemciye erişim.

MülkiyetAçıklama
readonly bucketId: stringBu istemcinin bağlı olduğu paketin tanımlayıcısı: tüm yöntemleri bu pakete etki eder.
YöntemAçıklama
upload(path: string, file: Blob | File | ArrayBuffer, options?: { contentType?: string; upsert?: boolean; metadata?: Record<string, string>; }): Promise<AuraResponse<UploadResult>>Bu pakete bir dosya yükleyin.
download(path: string, options?: { transform?: ImageTransform; }): BlobDownloadBuilderBu paketten bir dosya indirin.
list(options?: { prefix?: string; limit?: number; offset?: number; cursor?: string; }): Promise<AuraResponse<FileEntry[]>>Bu paketteki dosyaları listeleyin.
remove(paths: string[], options?: { permanent?: boolean; }): Promise<AuraResponse<null>>Bu paketten bir veya daha fazla dosyayı siler.
createSignedUrl(path: string, expiresInSeconds?: number, options?: { transform?: ImageTransform; }): Promise<AuraResponse<{ url: string; expires_in: number; }>>Bu paketteki bir dosya için geçici olarak imzalanmış bir URL oluşturur.
createSignedUrls(paths: string[], expiresInSeconds?: number, options?: { transform?: ImageTransform; }): Promise<AuraResponse<Array<{ path: string; url: string; expires_in: number; } | { path: string; error: AuraError; }>>>Bu paket için tek geçişte birden fazla imzalı URL oluşturur.
createSignedUploadUrl(path: string, expiresInSeconds?: number, options?: { upsert?: boolean; }): Promise<AuraResponse<{ url: string; expires_in: number; }>>Önceden imzalanmış bir yükleme URL'si (doğrudan PUT) oluşturur.
getPublicUrl(path: string, options?: { transform?: ImageTransform; }): { data: { publicUrl: string; }; }Bu paketteki bir dosyanın genel URL'sini döndürür.
#
Sınıf

BlobDownloadBuilder

Tembel indirme (Varsayılan olarak Blob).

YöntemAçıklama
asStream(): StreamDownloadBuilderAkışlı okumaya geçer: sonuç, belleğe yüklenen Blob yerine ReadableStream olur.
then<TR1 = AuraResponse<Blob>, TR2 = never>(onfulfilled?: ((v: AuraResponse<Blob>) => TR1 | PromiseLike<TR1>) | null, onrejected?: ((e: unknown) => TR2 | PromiseLike<TR2>) | null): Promise<TR1 | TR2>İndirmeyi tetikler (tembel: istek yalnızca await ile başlar); sonuç hafızaya alınır.
#
Sınıf

StreamDownloadBuilder

Değişken akış — res.body (ReadableStream).

YöntemAçıklama
then<TR1 = AuraResponse<ReadableStream<Uint8Array>>, TR2 = never>(onfulfilled?: ((v: AuraResponse<ReadableStream<Uint8Array>>) => TR1 | PromiseLike<TR1>) | null, onrejected?: ((e: unknown) => TR2 | PromiseLike<TR2>) | null): Promise<TR1 | TR2>Akış (tembel) indirmeyi tetikler; sonuç hafızaya alınır.
Oluşturulan sayfa

Bu sayfa, SDK'nın tür bildirimlerinden ve yorumlarından oluşturulduğundan, yayınlanan koddan sapamaz. Çalışılan örnekler için kılavuzları okuyun.