mirror of
https://github.com/get-drexa/drive.git
synced 2026-02-03 01:11:16 +00:00
feat: add blob store Initialize method
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package drexa
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/get-drexa/drexa/internal/auth"
|
||||
@@ -29,6 +30,11 @@ func NewServer(c Config) (*fiber.App, error) {
|
||||
return nil, fmt.Errorf("unknown storage backend: %s", c.Storage.Backend)
|
||||
}
|
||||
|
||||
err := blobStore.Initialize(context.Background())
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to initialize blob store: %w", err)
|
||||
}
|
||||
|
||||
// Initialize key resolver based on config
|
||||
var keyResolver virtualfs.BlobKeyResolver
|
||||
switch c.Storage.Mode {
|
||||
|
||||
Reference in New Issue
Block a user