PHPackages                             leafs/s3 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. leafs/s3

ActiveLibrary[Framework](/categories/framework)

leafs/s3
========

s3 module for Leaf FS

v0.1.0(11mo ago)0110MITPHPCI passing

Since Jun 14Pushed 10mo agoCompare

[ Source](https://github.com/leafsphp/s3)[ Packagist](https://packagist.org/packages/leafs/s3)[ Docs](https://leafphp.dev/docs/utils/fs.html#using-s3)[ GitHub Sponsors](https://github.com/leafsphp)[ Fund](https://opencollective.com/leaf)[ RSS](/packages/leafs-s3/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (6)Versions (2)Used By (0)

 [![](https://camo.githubusercontent.com/e83224618735d048f0f70f04e02d7973a634a055e18d47fe22501e3a85e40b9f/68747470733a2f2f6c6561667068702e6e65746c6966792e6170702f6173736574732f696d672f6c656166332d6c6f676f2e706e67)](https://camo.githubusercontent.com/e83224618735d048f0f70f04e02d7973a634a055e18d47fe22501e3a85e40b9f/68747470733a2f2f6c6561667068702e6e65746c6966792e6170702f6173736574732f696d672f6c656166332d6c6f676f2e706e67)

S3 Drop-in extension for Leaf FS
================================

[](#s3-drop-in-extension-for-leaf-fs)

S3 for Leaf FS
==============

[](#s3-for-leaf-fs)

[![Latest Stable Version](https://camo.githubusercontent.com/f6592b88b9de1958310fe19c8bdb10d0dc487d7368bd1f787de69e986ee2bab1/68747470733a2f2f706f7365722e707567782e6f72672f6c656166732f73332f762f737461626c65)](https://packagist.org/packages/leafs/s3)[![Total Downloads](https://camo.githubusercontent.com/cd7484550fef316038344dfed4374f927755f8371f0236e8b7938170f00c07c6/68747470733a2f2f706f7365722e707567782e6f72672f6c656166732f73332f646f776e6c6f616473)](https://packagist.org/packages/leafs/s3)[![License](https://camo.githubusercontent.com/254cc5d4d2f26618040b9d9a4a4dcab86d827a4d34f157eb67c29076de7690e8/68747470733a2f2f706f7365722e707567782e6f72672f6c656166732f73332f6c6963656e7365)](https://packagist.org/packages/leafs/s3)

A drop-in extension for [Leaf FS](https://github.com/leafs/fs) that allows you to use S3 as a storage driver for Leaf FS.

Installation
------------

[](#installation)

You can easily install Leaf using [Composer](https://getcomposer.org/).

```
composer require leafs/s3
```

Leaf MVC
--------

[](#leaf-mvc)

If you are using Leaf MVC, add your S3 URL to the `.env` file:

```
S3_URL=https://your-s3-url
```

Leaf without MVC
----------------

[](#leaf-without-mvc)

If you are using Leaf without MVC, you can set the S3 URL in your code:

```
storage()->bucket('your-s3-url');
```

Usage
-----

[](#usage)

From there, you can use the s3 bucket as you would with your local storage, only wrapping your storage path in the `withBucket()` method to switch to bucket storage. For example, to upload a file:

```
storage()->upload('path/to/file.txt', withBucket('path/in/s3'));

// or directly from the request
request()->upload('file', withBucket('path/in/s3'));
```

💬 Stay In Touch
---------------

[](#-stay-in-touch)

- [Twitter](https://twitter.com/leafphp)
- [Join the forum](https://github.com/leafsphp/leaf/discussions/37)
- [Chat on discord](https://discord.com/invite/Pkrm9NJPE3)

📓 Learning Leaf 3
-----------------

[](#-learning-leaf-3)

- Leaf has a very easy to understand [documentation](https://leafphp.dev) which contains information on all operations in Leaf.
- You can also check out our [youtube channel](https://www.youtube.com/channel/UCllE-GsYy10RkxBUK0HIffw) which has video tutorials on different topics
- You can also learn from [codelabs](https://codelabs.leafphp.dev) and contribute as well.

😇 Contributing
--------------

[](#-contributing)

We are glad to have you. All contributions are welcome! To get started, familiarize yourself with our [contribution guide](https://leafphp.dev/community/contributing.html) and you'll be ready to make your first pull request 🚀.

To report a security vulnerability, you can reach out to [@mychidarko](https://twitter.com/mychidarko) or [@leafphp](https://twitter.com/leafphp) on twitter. We will coordinate the fix and eventually commit the solution in this project.

🤩 Sponsoring Leaf
-----------------

[](#-sponsoring-leaf)

Your cash contributions go a long way to help us make Leaf even better for you. You can sponsor Leaf and any of our packages on [open collective](https://opencollective.com/leaf) or check the [contribution page](https://leafphp.dev/support/) for a list of ways to contribute.

And to all our [existing cash/code contributors](https://leafphp.dev#sponsors), we love you all ❤️

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance53

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

338d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/29547806?v=4)[Mychi](/maintainers/Mychi)[@mychi](https://github.com/mychi)

---

Top Contributors

[![mychidarko](https://avatars.githubusercontent.com/u/26604242?v=4)](https://github.com/mychidarko "mychidarko (5 commits)")

---

Tags

phpfilesystemframeworkfilesfsleaf

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/leafs-s3/health.svg)

```
[![Health](https://phpackages.com/badges/leafs-s3/health.svg)](https://phpackages.com/packages/leafs-s3)
```

###  Alternatives

[leafs/leaf

Elegant PHP for modern developers

1.3k44.3k9](/packages/leafs-leaf)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
