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,7 +16,6 @@ type UpdateOptions struct {
|
||||
|
||||
type Store interface {
|
||||
Initialize(ctx context.Context) error
|
||||
GenerateUploadURL(ctx context.Context, key Key, opts UploadURLOptions) (string, error)
|
||||
Put(ctx context.Context, key Key, reader io.Reader) error
|
||||
Update(ctx context.Context, key Key, opts UpdateOptions) error
|
||||
Delete(ctx context.Context, key Key) error
|
||||
@@ -25,4 +24,10 @@ type Store interface {
|
||||
Read(ctx context.Context, key Key) (io.ReadCloser, error)
|
||||
ReadRange(ctx context.Context, key Key, offset, length int64) (io.ReadCloser, error)
|
||||
ReadSize(ctx context.Context, key Key) (int64, error)
|
||||
|
||||
// SupportsDirectUpload returns true if the store allows files to be uploaded directly to the blob store.
|
||||
SupportsDirectUpload() bool
|
||||
|
||||
// GenerateUploadURL generates a URL that can be used to upload a file directly to the blob store. If unsupported, returns an empty string with no error.
|
||||
GenerateUploadURL(ctx context.Context, key Key, opts UploadURLOptions) (string, error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user