feat(multipart): Implement full multipart upload support with persistent manager, periodic cleanup, and API integration
This commit is contained in:
17
ts/index.ts
17
ts/index.ts
@@ -44,6 +44,14 @@ export interface ILimitsConfig {
|
||||
requestTimeout?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Multipart upload configuration
|
||||
*/
|
||||
export interface IMultipartConfig {
|
||||
expirationDays?: number;
|
||||
cleanupIntervalMinutes?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Server configuration
|
||||
*/
|
||||
@@ -71,6 +79,7 @@ export interface ISmarts3Config {
|
||||
cors?: ICorsConfig;
|
||||
logging?: ILoggingConfig;
|
||||
limits?: ILimitsConfig;
|
||||
multipart?: IMultipartConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -114,6 +123,10 @@ const DEFAULT_CONFIG: ISmarts3Config = {
|
||||
maxMetadataSize: 2048,
|
||||
requestTimeout: 300000, // 5 minutes
|
||||
},
|
||||
multipart: {
|
||||
expirationDays: 7,
|
||||
cleanupIntervalMinutes: 60,
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -145,6 +158,10 @@ function mergeConfig(userConfig: ISmarts3Config): Required<ISmarts3Config> {
|
||||
...DEFAULT_CONFIG.limits!,
|
||||
...(userConfig.limits || {}),
|
||||
},
|
||||
multipart: {
|
||||
...DEFAULT_CONFIG.multipart!,
|
||||
...(userConfig.multipart || {}),
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user