Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
c5add54
feat(storage): add multipart upload support
grdsdev Apr 1, 2026
76ac6fa
chore: update Package.resolved
grdsdev Apr 1, 2026
bc481d0
Saving uncommitted changes before archiving
Apr 28, 2026
0897695
refactor(storage): consolidate storage client APIs
grdsdev Apr 28, 2026
dc03947
refactor(storage): use new http client
grdsdev Apr 29, 2026
d8a7b0d
refactor(storage): remove encoder/decoder from StorageClientConfigura…
grdsdev Apr 29, 2026
92f7d3c
refactor(storage): move url out of StorageClientConfiguration
grdsdev Apr 29, 2026
01036c1
docs(storage): add comprehensive DocC documentation to all public APIs
grdsdev Apr 29, 2026
c1be1bd
fix(ci): add FoundationNetworking import for Linux and fix StorageFil…
grdsdev Apr 29, 2026
52eb0b0
fix: make StorageFileAPI Sendable
grdsdev Apr 29, 2026
f95203f
refactor(storage): consolidate BucketOptions and TransformOptions int…
grdsdev Apr 29, 2026
4500864
refactor(storage): remove non-idiomatic uploadFile convenience method
grdsdev Apr 29, 2026
a7d1184
docs: add Storage API improvements design spec
grdsdev Apr 29, 2026
990d719
docs(storage): add implementation plan for Storage API v2 improvements
grdsdev Apr 29, 2026
092b119
feat(storage): add ResizeMode, ImageFormat, SortOrder typed value types
grdsdev Apr 29, 2026
5b06d53
feat(storage): add ResizeMode, ImageFormat, SortOrder typed value types
grdsdev Apr 29, 2026
55be69f
feat(storage): add StorageByteCount value type
grdsdev Apr 29, 2026
51475e0
feat(storage): add DownloadBehavior enum
grdsdev Apr 29, 2026
45a32c1
refactor(storage): update TransformOptions to use ResizeMode and Imag…
grdsdev Apr 29, 2026
76a4220
refactor(storage): update SortBy.order to use SortOrder
grdsdev Apr 29, 2026
157626e
refactor(storage): rename BucketOptions.public to isPublic, fileSizeL…
grdsdev Apr 29, 2026
4223387
refactor(storage): remove duplex and headers from FileOptions
grdsdev Apr 29, 2026
dda3d5f
refactor(storage): make SearchOptions.prefix internal
grdsdev Apr 29, 2026
9b246cd
refactor(storage): rename FileObjectV2 to FileInfo, remove legacy Sig…
grdsdev Apr 29, 2026
7fb25d7
refactor(storage): update createSignedURL/createSignedURLs to use Dur…
grdsdev Apr 29, 2026
0986cfd
refactor(storage): update getPublicURL to use DownloadBehavior
grdsdev Apr 29, 2026
a58ebea
refactor(storage): normalize uploadToSignedURL default options to Fil…
grdsdev Apr 29, 2026
d7b666e
refactor(storage): update createSignedURL/createSignedURLs to use Dur…
grdsdev Apr 29, 2026
56523d4
feat(storage): add UploadProgress type
grdsdev Apr 29, 2026
a3fe9af
feat(storage): add upload progress reporting via optional trailing cl…
grdsdev Apr 29, 2026
68487a9
refactor(storage): use UUID for object/file ids in FileUploadResponse…
grdsdev Apr 29, 2026
c626354
fix(storage): update test mocks to use valid UUIDs after Id type change
grdsdev Apr 30, 2026
5d3cd79
fix(examples): update storage examples for refactored SDK types
grdsdev Apr 30, 2026
80e86e9
docs: add StorageError refactor design spec
grdsdev Apr 30, 2026
38c4954
docs: add StorageError refactor implementation plan
grdsdev Apr 30, 2026
0ddff00
chore: ignore .claude and .claire directories
grdsdev Apr 30, 2026
56450a4
refactor(storage): replace StorageError struct with typed StorageErro…
grdsdev Apr 30, 2026
7a96e1e
chore: remove superpowers docs from repo
grdsdev Apr 30, 2026
f60f42d
chore: ignore docs/superpowers directory
grdsdev Apr 30, 2026
d0f75ca
refactor(storage): migrate storage tests from XCTest to Swift Testing
grdsdev Apr 30, 2026
72101d2
refactor(storage): rename DownloadBehavior cases to avoid redundant c…
grdsdev Apr 30, 2026
379c5e8
fix(storage): update integration tests to use renamed DownloadBehavio…
grdsdev Apr 30, 2026
3cde547
chore: apply swift-format to StorageFileIntegrationTests
grdsdev Apr 30, 2026
672b6d9
fix(storage): remove Mocker.removeAll() from test init to prevent con…
grdsdev Apr 30, 2026
e9a99e7
fix(storage): replace unstable StorageError dump snapshots with direc…
grdsdev Apr 30, 2026
fa0e5d6
fix(storage): address pre-release review issues
grdsdev Apr 30, 2026
c8c0db7
chore: apply swift-format to StorageClient
grdsdev Apr 30, 2026
cb28bdf
fix(storage): update isNotFoundStatus400 test to match new isNotFound…
grdsdev May 4, 2026
6fa2a16
chore: apply swift-format to StorageFileAPI and tests
grdsdev May 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ temp_coverage

.cursor
.serena/
.claude/
.claire/
docs/superpowers/

# Node.js
node_modules/
Expand Down
8 changes: 4 additions & 4 deletions Examples/Examples/Storage/BucketOperationsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ struct BucketOperationsView: View {
isLoading = true
defer { isLoading = false }

var options = BucketOptions(public: isPublic)
var options = BucketOptions(isPublic: isPublic)
if !fileSizeLimit.isEmpty, let limit = Int64(fileSizeLimit) {
options.fileSizeLimit = String(limit)
options.fileSizeLimit = StorageByteCount(limit)
}

try await supabase.storage.createBucket(bucketName, options: options)
Expand Down Expand Up @@ -178,8 +178,8 @@ struct BucketOperationsView: View {

let newPublic = !bucket.isPublic
let options = BucketOptions(
public: newPublic,
fileSizeLimit: bucket.fileSizeLimit.map(String.init)
isPublic: newPublic,
fileSizeLimit: bucket.fileSizeLimit.map { StorageByteCount($0) }
)

try await supabase.storage.updateBucket(bucket.id, options: options)
Expand Down
9 changes: 5 additions & 4 deletions Examples/Examples/Storage/FileObjectDetailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Supabase
import SwiftUI

struct FileObjectDetailView: View {
let api: StorageFileApi
let api: StorageFileAPI
let fileObject: FileObject

@Environment(\.openURL) var openURL
Expand All @@ -25,7 +25,8 @@ struct FileObjectDetailView: View {
Button("createSignedURL") {
Task {
do {
let url = try await api.createSignedURL(path: fileObject.name, expiresIn: 60)
let url = try await api.createSignedURL(
path: fileObject.name, expiresIn: .seconds(60))
lastActionResult = ("createSignedURL", url)
openURL(url)
} catch {}
Expand All @@ -37,8 +38,8 @@ struct FileObjectDetailView: View {
do {
let url = try await api.createSignedURL(
path: fileObject.name,
expiresIn: 60,
download: true
expiresIn: .seconds(60),
download: .withOriginalName
)
lastActionResult = ("createSignedURL (download)", url)
openURL(url)
Expand Down
6 changes: 3 additions & 3 deletions Examples/Examples/Storage/FileSearchView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct FileSearchView: View {
@State private var sortColumn: SortColumn = .name
@State private var sortOrder: SortOrder = .ascending
@State private var limit = "100"
@State private var selectedFile: FileObjectV2?
@State private var selectedFile: FileInfo?
@State private var error: Error?
@State private var isLoading = false

Expand Down Expand Up @@ -144,7 +144,7 @@ struct FileSearchView: View {
if let selectedFile {
Section("File Details") {
DetailRow(label: "Name", value: selectedFile.name)
DetailRow(label: "ID", value: selectedFile.id)
DetailRow(label: "ID", value: selectedFile.id.uuidString)
DetailRow(label: "Version", value: selectedFile.version)

if let contentType = selectedFile.contentType {
Expand Down Expand Up @@ -300,7 +300,7 @@ struct FileSearchView: View {
offset: 0,
sortBy: SortBy(
column: sortColumn.rawValue,
order: sortOrder.rawValue
order: .init(rawValue: sortOrder.rawValue)
),
search: searchText.isEmpty ? nil : searchText
)
Expand Down
4 changes: 2 additions & 2 deletions Examples/Examples/Storage/ImageTransformView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,9 @@ struct ImageTransformView: View {
let options = TransformOptions(
width: Int(width),
height: Int(height),
resize: resizeMode.rawValue,
resize: Storage.ResizeMode(rawValue: resizeMode.rawValue),
quality: Int(quality),
format: format.value
format: format.value.map { Storage.ImageFormat(rawValue: $0) }
)

let data = try await supabase.storage
Expand Down
2 changes: 1 addition & 1 deletion Examples/Examples/Storage/SignedURLsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ struct SignedURLsView: View {

signedURL = try await supabase.storage
.from(selectedBucket)
.createSignedURL(path: filePath, expiresIn: expiresInSeconds)
.createSignedURL(path: filePath, expiresIn: .seconds(expiresInSeconds))
} catch {
self.error = error
}
Expand Down
6 changes: 3 additions & 3 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let package = Package(
platforms: [
.iOS(.v16),
.macCatalyst(.v16),
.macOS(.v12),
.macOS(.v13),
.watchOS(.v9),
.tvOS(.v16),
],
Expand Down
20 changes: 0 additions & 20 deletions Sources/Storage/BucketOptions.swift

This file was deleted.

13 changes: 0 additions & 13 deletions Sources/Storage/Codable.swift

This file was deleted.

8 changes: 0 additions & 8 deletions Sources/Storage/Exports.swift

This file was deleted.

34 changes: 25 additions & 9 deletions Sources/Storage/Helpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import Foundation
import Helpers

#if canImport(MobileCoreServices)
import MobileCoreServices
Expand All @@ -23,10 +24,15 @@ import Foundation
?? "application/octet-stream"
} else {
if let id = UTTypeCreatePreferredIdentifierForTag(
kUTTagClassFilenameExtension, pathExtension as CFString, nil
kUTTagClassFilenameExtension,
pathExtension as CFString,
nil
)?.takeRetainedValue(),
let contentType = UTTypeCopyPreferredTagWithClass(id, kUTTagClassMIMEType)?
.takeRetainedValue()
let contentType = UTTypeCopyPreferredTagWithClass(
id,
kUTTagClassMIMEType
)?
.takeRetainedValue()
{
return contentType as String
}
Expand All @@ -39,10 +45,15 @@ import Foundation
?? "application/octet-stream"
} else {
if let id = UTTypeCreatePreferredIdentifierForTag(
kUTTagClassFilenameExtension, pathExtension as CFString, nil
kUTTagClassFilenameExtension,
pathExtension as CFString,
nil
)?.takeRetainedValue(),
let contentType = UTTypeCopyPreferredTagWithClass(id, kUTTagClassMIMEType)?
.takeRetainedValue()
let contentType = UTTypeCopyPreferredTagWithClass(
id,
kUTTagClassMIMEType
)?
.takeRetainedValue()
{
return contentType as String
}
Expand All @@ -58,10 +69,15 @@ import Foundation
func mimeType(forPathExtension pathExtension: String) -> String {
#if canImport(CoreServices) || canImport(MobileCoreServices)
if let id = UTTypeCreatePreferredIdentifierForTag(
kUTTagClassFilenameExtension, pathExtension as CFString, nil
kUTTagClassFilenameExtension,
pathExtension as CFString,
nil
)?.takeRetainedValue(),
let contentType = UTTypeCopyPreferredTagWithClass(id, kUTTagClassMIMEType)?
.takeRetainedValue()
let contentType = UTTypeCopyPreferredTagWithClass(
id,
kUTTagClassMIMEType
)?
.takeRetainedValue()
{
return contentType as String
}
Expand Down
Loading
Loading