mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-10 04:22:09 +10:00
Object storage now works fully, with the permission system. It still needs additional external endpoints for updating and deleting objects from the API, but it is otherwise complete. Further tasks include writing an S3 adapter.
12 lines
337 B
TypeScript
12 lines
337 B
TypeScript
import { FsObjectBackend } from "../internal/objects/fsBackend";
|
|
|
|
export default defineNitroPlugin((nitro) => {
|
|
const currentObjectHandler = new FsObjectBackend();
|
|
|
|
// To-do insert logic surrounding deciding what object backend to use
|
|
|
|
nitro.hooks.hook("request", (h3) => {
|
|
h3.context.objects = currentObjectHandler;
|
|
});
|
|
});
|