nocobase-drive
하는 일
이 스킬은 로컬 폴더, S3 호환 서비스, Aliyun OSS를 포함해 NocoBase 3 앱의 파일 저장소를 설정합니다. 업로드와 저장소 설정을 다루는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓NocoBase 앱이 업로드된 파일을 저장하는 위치를 바꿔야 할 때.
- ✓앱을 S3나 Aliyun OSS 저장소에 연결하고 싶을 때.
- ✓저장소 URL이나 파일 작업의 설정 문제를 고쳐야 할 때.
스킬 링크
https://github.com/nocobase/nocobase/blob/v3-develop/packages/libs/drive/skills/nocobase-drive/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“NocoBase 앱이 업로드된 파일을 로컬 디스크 대신 S3 버킷에 저장하도록 설정해 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
AI는 저장소 설정을 편집하며, 저장소 종류에 맞는 드라이버를 고릅니다. 그다음 파일 작업과 앱이 생성하는 URL을 확인합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
File storage with NocoBase Drive
Use @nocobase/drive for storage operations. It wraps Flydrive with application configuration and a native Aliyun OSS driver. Choose the relevant reference before changing a disk:
| Storage | Driver | Read |
|---|---|---|
| A local or mounted filesystem | fs |
Filesystem configuration, paths, and URLs |
| Amazon S3 or an S3-compatible service | s3 |
S3 configuration, credentials, and ACLs |
| Native Aliyun OSS with access keys or an ECS RAM role | oss |
OSS configuration, credentials, and networking |
| An application-owned or third-party Flydrive driver | Factory function | Custom driver factories |
Configuration and application integration
Configure default and disks in server/config/drive.ts; config.yml can override serializable object options. A disk name is the key in disks, while driver selects an implementation. For example, local: { driver: 'fs', ... } is selected by drive.use('local'). default must name an entry in disks. Objects and synchronous factories can coexist; no separate services configuration or driver registry is required.
Keep the application's existing DriveProvider and import driveManagerToken from @nocobase/app-server/drive. In server code that already has an application instance:
import { driveManagerToken } from '@nocobase/app-server/drive';
const drive = app.container.resolve(driveManagerToken);
const disk = drive.use();
await disk.put('reports/example.txt', 'Example report');
const contents = await disk.get('reports/example.txt');
Use drive.use(name) to select another disk. Pass storage keys relative to that disk, such as reports/example.txt; do not pass an absolute filesystem path, a URL, or a pre-encoded key. The manager creates disks on first use and caches successful creation. Resolve the shared manager instead of constructing one per request.
File Repository selects these same disks by name. Use the installed File plugin for file records, Repository upload/download operations, and their permissions. Direct Drive operations do not create File Repository records or perform its authorization checks. Changing the default disk does not move stored objects or rewrite existing records.
Boundaries and verification
visibility does not itself guarantee HTTP access or isolation. Filesystem serving and object storage policies determine actual access; generating a public URL does not grant permission to a private object. Read the selected driver's URL behavior before exposing a link.
Release artifact storage needs serializable configuration. Custom factories are rejected when selected by releases.artifact.disk. Named artifact references currently accept private fs and s3 objects; use the complete OSS object directly under releases.artifact or host.artifact for OSS, as the OSS guide describes.
For standalone use, call prepareDriveStorage(config) before createDriveManager(config) when filesystem directory preparation is needed. The application Provider already performs preparation. Tests can supply createDriveManager(config, { fakes: { location } }) and use Flydrive's fake()/restore(); fakes verify application behavior without proving remote credentials, ACLs, or network access.
Verify a configuration change with a write, read or streamed download, and deletion under a disposable key. Check public or signed links from the intended client's network when the feature uses them. Report whether verification used local storage, fakes, or the real remote service. For custom drivers, also verify lazy creation and repeated use through the shared manager.
자주 묻는 질문
업로드 권한도 다루나요?
아니요. 파일 컬렉션과 업로드 권한은 File 플러그인에 속합니다.
목록에 없는 저장소 종류를 쓸 수 있나요?
네. 이 스킬은 다른 저장소 서비스를 위한 사용자 정의 드라이버 팩토리도 다룹니다.
저장소 인증 정보도 다루나요?
네. 저장소 종류마다 인증 정보를 설정하는 방법을 설명합니다.
상세 정보
작성자의 원본 설명
Configure and use file storage with @nocobase/drive in NocoBase 3 applications, including local filesystem, S3-compatible storage, native Aliyun OSS, and custom driver factories. Use when changing drive configuration, storage credentials, file operations, or storage URLs. File Repository collections and upload permissions belong to the File plugin.
repo: nocobase/nocobase
인기도
- GitHub 스타
- 25k
- 순위
- #10084
- 라이선스
- —
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
nocobase-app-development
25k에이전트가 완전한 NocoBase 3 업무 애플리케이션을 위해 페이지, 라우트, 데이터, 권한, 테스트를 만들도록 돕습니다.
shadcn
25k에이전트가 웹 프로젝트에서 공식 문서와 레지스트리를 사용해 shadcn/ui 컴포넌트를 찾고, 추가하고, 고치고, 스타일을 입히도록 돕습니다.
nocobase-app-plugin-development
25k에이전트가 기존 NocoBase 3 앱 안에서 서버, 클라이언트, 데이터베이스, 등록 부분을 포함한 플러그인을 만들고 관리하도록 돕습니다.
nocobase-app-upgrade
25k에이전트가 NocoBase 앱을 더 새로운 템플릿 릴리스로 업그레이드하고, 사용자의 작업을 지키면서 템플릿 변경을 가져오도록 돕습니다.
비슷한 스킬
api-connector-builder
280k에이전트가 기존 패턴을 따라 새로운 API 연결을 만들도록 합니다. 새로운 방식을 도입하지 않고 연동을 하나 더 추가할 때 씁니다.
api-design
280k에이전트가 모범 사례에 따라 REST API를 설계하도록 돕습니다. API가 통신하는 방식, 오류를 보여 주는 방식, 데이터를 정리하는 방식을 정하는 데 유용합니다.
backend-patterns
280k에이전트가 서버 쪽 아키텍처 패턴과 데이터베이스 최적화를 다루도록 돕습니다. 서버에서 실행되는 코드를 만들거나 검토할 때 유용합니다.