https://github.com/feather-framework/feather-storage-s3
S3 compatible storage driver for the Feather CMS storage service.
https://github.com/feather-framework/feather-storage-s3
Last synced: 4 months ago
JSON representation
S3 compatible storage driver for the Feather CMS storage service.
- Host: GitHub
- URL: https://github.com/feather-framework/feather-storage-s3
- Owner: feather-framework
- License: mit
- Created: 2023-11-07T10:48:20.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2026-02-23T10:51:43.000Z (4 months ago)
- Last Synced: 2026-02-23T18:59:06.439Z (4 months ago)
- Language: Swift
- Homepage:
- Size: 46.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Feather Storage S3
S3 compatible driver implementation for the abstract [Feather Storage](https://github.com/feather-framework/feather-storage) Swift API package.
[

](
https://github.com/feather-framework/feather-storage-s3/releases/tag/1.0.0-beta.1
)
## Features
- S3 compatible driver for Feather Storage
- Designed for modern Swift concurrency
- DocC-based API Documentation
- Unit tests and code coverage
## Requirements


- Swift 6.1+
- Platforms:
- Linux
- macOS 15+
- iOS 18+
- tvOS 18+
- watchOS 11+
- visionOS 2+
## Installation
Add the dependency to your `Package.swift`:
```swift
.package(url: "https://github.com/feather-framework/feather-storage-s3", exact: "1.0.0-beta.1"),
```
Then add `FeatherStorageS3` to your target dependencies:
```swift
.product(name: "FeatherStorageS3", package: "feather-storage-s3"),
```
## Usage
API documentation is available at the link below:
[

](
https://feather-framework.github.io/feather-storage-s3/
)
Here is a brief example:
```swift
import NIOCore
import FeatherStorage
import FeatherStorageS3
let text = "Hello, World"
var buffer = ByteBufferAllocator().buffer(capacity: text.utf8.count)
buffer.writeString(text)
try await storage.upload(
key: "docs/hello.txt",
sequence: StorageSequence(
asyncSequence: ByteBufferSequence(buffer: buffer),
length: UInt64(buffer.readableBytes)
)
)
try await storage.exists(key: "docs/hello.txt")
try await storage.size(key: "docs/hello.txt")
let result = try await storage.download(key: "docs/hello.txt", range: nil)
let buffer = try await result.collect(upTo: .max)
let value = buffer.getString(at: 0, length: buffer.readableBytes)
print(value)
```
> [!WARNING]
> This repository is a work in progress, things can break until it reaches v1.0.0.
## Other storage drivers
The following storage client implementations are also available for use:
- [FS](https://github.com/feather-framework/feather-storage-fs)
- [Ephemeral](https://github.com/feather-framework/feather-storage-ephemeral)
## Development
- Build: `swift build`
- Test:
- local: `swift test`
- using Docker: `make docker-test`
- Format: `make format`
- Check: `make check`
## Contributing
[Pull requests](https://github.com/feather-framework/feather-storage-s3/pulls) are welcome. Please keep changes focused and include tests for new logic. 🙏