@nocobase/plugin-file-manager
Version:
Provides files storage services with files collection template and attachment field.
44 lines (43 loc) • 1.35 kB
TypeScript
/**
* This file is part of the NocoBase (R) project.
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
* Authors: NocoBase Team.
*
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
* For more information, please refer to: https://www.nocobase.com/agreement.
*/
import { AttachmentModel, StorageType } from '.';
declare class TxCosStorage {
cos: any;
getFilename: Function;
baseUrl: string;
options: Record<string, any>;
constructor({ config, baseUrl, filename }: {
config: any;
baseUrl: any;
filename: any;
});
getUploadedFileURL(key: string, location?: string): any;
_handleFile(req: any, file: any, cb: any): any;
_removeFile(req: any, file: any, cb: any): any;
}
export default class extends StorageType {
static defaults(): {
title: string;
type: string;
name: string;
baseUrl: string;
options: {
Region: string;
SecretId: string;
SecretKey: string;
Bucket: string;
};
};
static filenameKey: string;
make(): TxCosStorage;
exists(record: AttachmentModel): Promise<boolean>;
copy(source: AttachmentModel, target: AttachmentModel): Promise<void>;
delete(records: AttachmentModel[]): Promise<[number, AttachmentModel[]]>;
}
export {};