-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Azure blob storage backend #638
base: main
Are you sure you want to change the base?
Conversation
|
||
func (s *AzureStorage) Get(ctx context.Context, token string, filename string, _ *Range) (io.ReadCloser, uint64, error) { | ||
key := fmt.Sprintf("%s/%s", token, filename) | ||
blobClient := s.containerClient.NewBlobClient(key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does azure blob storage support content range?
see: https://github.com/dutchcoders/transfer.sh/blob/main/server/storage/s3.go#L103-L105
} | ||
|
||
func (s *AzureStorage) IsNotExist(err error) bool { | ||
return err != nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you sure about this?
there's not specific error
for files that not exist in the storage? and is only error that can be returned a file that doesn't exist?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm not sure yet. I found https://github.com/Azure/azure-sdk-for-go/blob/sdk/storage/azblob/v1.6.0/sdk/storage/azblob/internal/generated/zz_constants.go#L511 but not sure if this is accessible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hello @joshspicer , thank you very much for the contribution!
much appreciated!
please see my comments and we can probably merge this soon
finally getting around to #505 😅