mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-16 19:00:38 +09:00
feat: add storage system with local disk and S3 providers
Introduces a provider-agnostic storage subsystem for file attachments. Includes local disk and S3 backends, asset/attachment DB schemas, issue attachment CRUD routes with multer upload, CLI configure/doctor/env integration, and enriched issue ancestors with project/goal resolution. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
32119f5c2f
commit
fdd2ea6157
36 changed files with 1683 additions and 32 deletions
18
server/src/storage/provider-registry.ts
Normal file
18
server/src/storage/provider-registry.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import type { Config } from "../config.js";
|
||||
import type { StorageProvider } from "./types.js";
|
||||
import { createLocalDiskStorageProvider } from "./local-disk-provider.js";
|
||||
import { createS3StorageProvider } from "./s3-provider.js";
|
||||
|
||||
export function createStorageProviderFromConfig(config: Config): StorageProvider {
|
||||
if (config.storageProvider === "local_disk") {
|
||||
return createLocalDiskStorageProvider(config.storageLocalDiskBaseDir);
|
||||
}
|
||||
|
||||
return createS3StorageProvider({
|
||||
bucket: config.storageS3Bucket,
|
||||
region: config.storageS3Region,
|
||||
endpoint: config.storageS3Endpoint,
|
||||
prefix: config.storageS3Prefix,
|
||||
forcePathStyle: config.storageS3ForcePathStyle,
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue