mirror of
https://github.com/get-drexa/drive.git
synced 2025-11-30 21:41:39 +00:00
fix: upload url generation
This commit is contained in:
@@ -16,8 +16,7 @@ type FSStore struct {
|
||||
}
|
||||
|
||||
type FSStoreConfig struct {
|
||||
Root string
|
||||
UploadURL string
|
||||
Root string
|
||||
}
|
||||
|
||||
func NewFSStore(config FSStoreConfig) *FSStore {
|
||||
@@ -28,10 +27,6 @@ func (s *FSStore) Initialize(ctx context.Context) error {
|
||||
return os.MkdirAll(s.config.Root, 0755)
|
||||
}
|
||||
|
||||
func (s *FSStore) GenerateUploadURL(ctx context.Context, key Key, opts UploadURLOptions) (string, error) {
|
||||
return s.config.UploadURL, nil
|
||||
}
|
||||
|
||||
func (s *FSStore) Put(ctx context.Context, key Key, reader io.Reader) error {
|
||||
path := filepath.Join(s.config.Root, string(key))
|
||||
|
||||
@@ -149,3 +144,11 @@ func (s *FSStore) Move(ctx context.Context, srcKey, dstKey Key) error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *FSStore) SupportsDirectUpload() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (s *FSStore) GenerateUploadURL(ctx context.Context, key Key, opts UploadURLOptions) (string, error) {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user