Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hjr265/s3ow

Go package for stream uploading files to S3
https://github.com/hjr265/s3ow

aws aws-s3 aws-sdk-go go golang

Last synced: 25 days ago
JSON representation

Go package for stream uploading files to S3

Awesome Lists containing this project

README

        

# S3 Object Writer

[![Go Reference](https://pkg.go.dev/badge/github.com/hjr265/s3ow.svg)](https://pkg.go.dev/github.com/hjr265/s3ow)

Write objects directly to AWS S3-like storages without requiring any intermediary files.

[How It Works](https://hjr265.me/blog/stream-uploading-files-s3-object-writer/)

## Installation

Install s3ow using the go get command:

```
$ go get github.com/hjr265/s3ow
```

## Usage

Creating and uploading a ZIP to S3:

```golang
s, _ := session.NewSession()
ow := s3ow.New(s, s3ow.Bucket(""), s3ow.Key(""))
zw := zip.NewWriter(ow)
// Add stuff to zip.
zw.Close()
ow.Close() // Returns nil after upload is complete, or error.
```

## Contributing

Contributions are welcome.

## License

This Go package (s3ow) is available under the [BSD (3-Clause) License](https://opensource.org/licenses/BSD-3-Clause).