mirror of
https://github.com/versity/versitygw.git
synced 2026-01-07 20:25:12 +00:00
test: more chunked upload tests with different payload types
This commit is contained in:
17
tests/rest_scripts/command/putObjectCommand.go
Normal file
17
tests/rest_scripts/command/putObjectCommand.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"errors"
|
||||
)
|
||||
|
||||
func NewPutObjectCommand(s3Command *S3Command) (*S3Command, error) {
|
||||
if s3Command.BucketName == "" {
|
||||
return nil, errors.New("PutObject must have bucket name")
|
||||
}
|
||||
if s3Command.ObjectKey == "" {
|
||||
return nil, errors.New("PutObject must have object key")
|
||||
}
|
||||
s3Command.Method = "PUT"
|
||||
s3Command.Query = ""
|
||||
return s3Command, nil
|
||||
}
|
||||
Reference in New Issue
Block a user