storage_client 패키지는 Flutter 애플리케이션에서 Supabase Storage와 상호 작용할 수 있도록 해주는 Dart 라이브러리입니다. Supabase Storage는 PostgreSQL 기반의 접근 제어를 갖춘 S3 호환 스토리지에서 파일을 관리하는 서비스입니다. 이 패키지는 Supabase의 인증 및 권한 시스템을 활용하여 파일을 안전하게 업로드, 다운로드, 목록 조회 및 삭제하는 메서드를 제공합니다. Supabase 프로젝트와 원활한 통합을 위해 설계되었으며, 모바일, 웹, 데스크톱 등 주요 플랫폼을 모두 지원합니다. 역할 기반 접근 제어를 통해 강력한 보안을 유지하면서 파일 처리를 간소화합니다.
사용 사례
이미지나 문서와 같은 사용자 생성 콘텐츠 업로드
클라우드 스토리지에 저장된 앱 자산 관리
사용자 간에 안전한 파일 공유 구현
실시간 앱에서 미디어 파일 저장 및 검색
Flutter 앱에서 동적 콘텐츠 전달 활성화
주요 기능
Supabase 인증을 통한 안전한 파일 작업
S3 호환 스토리지 백엔드 지원
크로스 플랫폼 호환성 (Android, iOS, Web, macOS, Windows, Linux)
The helpers the test suites of these packages run on are published in
package:supabase_test,
so your tests can build on the same primitives: mock HTTP clients, JWT builders,
auth session fixtures and realtime frames. Add the package as a dev dependency:
dev_dependencies:supabase_test:^0.1.0
Then stub the endpoints the code under test talks to and run it against a
real SupabaseClient, with no running stack required:
final httpClient = MockSupabaseHttpClient()
..stubTable('todos', rows: [
{'id': 1, 'task': 'Ship it', 'status': false},
]);
final supabase = testSupabaseClient(httpClient: httpClient);
addTearDown(supabase.dispose);
final todos = await supabase.from('todos').select();
expect(todos, hasLength(1));
See the supabase_test README for the
full guide: stubbing database, rpc, edge function and auth endpoints,
asserting on recorded requests, running tests as a signed-in user, and wiring
Supabase.initialize in Flutter widget tests.
Testing this repo
The tests for the packages postgrest, supabase_auth, supabase_realtime and supabase_storage run against a
local Supabase stack. To run these tests locally you need docker and the
Supabase CLI installed.
The single configuration for the stack lives in the supabase directory at the repository root.
Start it with:
supabase start
Run the Dart tests within the package directory in packages/<package> with the following command.
The -j 1 flag runs the tests not concurrently, which works better since the tests run against the
same services.
dart test -j 1
To stop the stack run the following command from the repository root: