Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/hjr265/s3ow
- Owner: hjr265
- License: bsd-3-clause
- Created: 2021-06-06T04:44:08.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-06-06T07:07:59.000Z (over 3 years ago)
- Last Synced: 2024-06-20T16:46:14.230Z (5 months ago)
- Topics: aws, aws-s3, aws-sdk-go, go, golang
- Language: Go
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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).