We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am trying to upload the output of a command using a pipe, while doing so, Put() fails with the following error.
Put()
2020/11/23 13:43:37 PutObject, putting object: ReadRequestBody: unable to initialize upload caused by: seek /dev/stdin: illegal seek
This is the sample code for repro:
package main import ( "log" "os" "github.com/graymeta/stow" _ "github.com/graymeta/stow/s3" ) func main() { accessKeyId := os.Getenv("S3ACCESSKEYID") secretKey := os.Getenv("S3SECRETKEY") region := os.Getenv("S3REGION") bucket := os.Getenv("S3BUCKET") if accessKeyId == "" || secretKey == "" || region == "" || bucket == "" { log.Println("skipping test because missing one or more of S3ACCESSKEYID S3SECRETKEY S3REGION S3BUCKET") os.Exit(1) } config := stow.ConfigMap{ "access_key_id": accessKeyId, "secret_key": secretKey, "region": region, } location, err := stow.Dial("s3", config) if err != nil { log.Fatal(err) } defer location.Close() c, err := location.Container(bucket) if err != nil { log.Fatal(err) } _, err = c.Put("test-stream", os.Stdin, 0, nil) if err != nil { log.Fatal(err) } }
Output:
$ echo "sample text" | go run main.go 2020/11/23 13:43:37 PutObject, putting object: ReadRequestBody: unable to initialize upload caused by: seek /dev/stdin: illegal seek exit status 1
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am trying to upload the output of a command using a pipe, while doing so,
Put()
fails with the following error.This is the sample code for repro:
Output:
The text was updated successfully, but these errors were encountered: