mirror of
https://github.com/cloudreve/cloudreve.git
synced 2026-06-27 14:26:56 +00:00
fix(s3): throw error is content length is missing (fix #3394)
This commit is contained in:
@@ -422,6 +422,10 @@ func (handler *Driver) Meta(ctx context.Context, path string) (*MetaData, error)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if res == nil || res.ContentLength == nil {
|
||||
return nil, errors.New("invalid response from S3: missing ContentLength")
|
||||
}
|
||||
|
||||
etag := ""
|
||||
if res.ETag != nil {
|
||||
etag = *res.ETag
|
||||
|
||||
Reference in New Issue
Block a user