PHPackages                             bunnycdn/storage - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. bunnycdn/storage

ActiveLibrary[File &amp; Storage](/categories/file-storage)

bunnycdn/storage
================

PHP library to interact with the BunnyCDN Storage API.

3.4.0(1y ago)8460.2k↓12.6%28[1 issues](https://github.com/BunnyWay/BunnyCDN.PHP.Storage/issues)1MITPHPPHP ^7.4||^8.0CI passing

Since Dec 14Pushed 5mo ago9 watchersCompare

[ Source](https://github.com/BunnyWay/BunnyCDN.PHP.Storage)[ Packagist](https://packagist.org/packages/bunnycdn/storage)[ Docs](https://bunny.net/storage/)[ RSS](/packages/bunnycdn-storage/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (3)Versions (9)Used By (1)

Bunny Storage PHP library
=========================

[](#bunny-storage-php-library)

The official PHP library used for interacting with the BunnyCDN Storage API.

Install
-------

[](#install)

```
composer require bunnycdn/storage

```

Usage
-----

[](#usage)

Create an instance of the `\Bunny\Storage\Client` with the authentication details

```
$client = new \Bunny\Storage\Client('access-key', 'storage-zone', \Bunny\Storage\Region::SINGAPORE);
```

The BunnyCDNStorage constructor takes the following parameters:

- **apiAccessKey** - The API access key (password)
- **storageZoneName** - The name of your storage zone
- **storageZoneRegion** - The storage zone region [code](src/Region.php#L9-L17) (de, ny, or sg)

### Navigation:

[](#navigation)

- [upload](#uploading-objects)
- [download](#downloading-objects)
- [listFiles](#listing-objects)
- [info](#get-an-objects-details)
- [delete](#deleting-objects)
- [deleteMultiple](#delete-multiple-objects)
- [putContents](#put-file-contents)
- [getContents](#get-file-contents)

---

### Uploading objects

[](#uploading-objects)

```
$client->upload('/path/to/local/file.txt', 'remote/path/hello-world.txt');
```

The checksum can be disabled using the `$withChecksum` parameter:

```
$client->upload('/path/to/local/file.txt', 'remote/path/hello-world.txt', false);
```

Note

Async uploads are supported with `$client->uploadAsync()`. It will return a `GuzzleHttp\Promise\PromiseInterface`.

---

### Downloading objects

[](#downloading-objects)

```
$client->download('remote/path/hello-world.txt', '/path/to/local/file.txt');
```

---

### Listing objects

[](#listing-objects)

```
$items = $client->listFiles('remote/path/');
```

Returns an array of [FileInfo](src/FileInfo.php) objects.

---

### Get an object's details

[](#get-an-objects-details)

```
$item = $client->info('remote/path/hello-world.txt');
```

Returns an instance of [FileInfo](src/FileInfo.php).

---

### Deleting objects

[](#deleting-objects)

```
$client->delete('remote/path/hello-world.txt');
```

---

### Delete multiple objects

[](#delete-multiple-objects)

```
$errors = $client->deleteMultiple(['file1.txt', 'file2.txt', 'non-existing.txt']);
var_dump($errors);

/*
array(1) {
  'non-existing.txt' =>
  string(16) "Object not found"
}
*/
```

---

### Put file contents

[](#put-file-contents)

```
$content = 'Hello, world!';
$client->putContents('hello-world.txt', $content);
```

The checksum can be disabled using the `$withChecksum` parameter:

```
$content = 'Hello, world!';
$client->putContents('hello-world.txt', $content, false);
```

---

### Get file contents

[](#get-file-contents)

```
$content = $client->getContents('hello-world.txt');
echo $content; // Hello, world!
```

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance54

Moderate activity, may be stable

Popularity47

Moderate usage in the ecosystem

Community26

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 82.4% 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

Every ~32 days

Total

8

Last Release

658d ago

Major Versions

2.1.0 → 3.0.02024-03-20

PHP version history (2 changes)2.0.0PHP &gt;=8.0.0

3.0.0PHP ^7.4||^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/c586b3f11b4a49ea1e77bddc4056d641c734d03790b811cfca079362856d338c?d=identicon)[rafael-at-bunny](/maintainers/rafael-at-bunny)

---

Top Contributors

[![rafael-at-bunny](https://avatars.githubusercontent.com/u/150656102?v=4)](https://github.com/rafael-at-bunny "rafael-at-bunny (28 commits)")[![jamie-at-bunny](https://avatars.githubusercontent.com/u/241752294?v=4)](https://github.com/jamie-at-bunny "jamie-at-bunny (3 commits)")[![aaronlp](https://avatars.githubusercontent.com/u/9776187?v=4)](https://github.com/aaronlp "aaronlp (1 commits)")[![DejanPelzel](https://avatars.githubusercontent.com/u/1392401?v=4)](https://github.com/DejanPelzel "DejanPelzel (1 commits)")[![sifex](https://avatars.githubusercontent.com/u/2058557?v=4)](https://github.com/sifex "sifex (1 commits)")

---

Tags

storagemediabunnyCDNBunny.net

### Embed Badge

![Health badge](/badges/bunnycdn-storage/health.svg)

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

###  Alternatives

[google/cloud

Google Cloud Client Library

1.2k16.2M53](/packages/google-cloud)[azure-oss/storage

Azure Blob Storage PHP SDK

37985.0k5](/packages/azure-oss-storage)[frosh/platform-thumbnail-processor

This plugins allows you to use variable thumbnails, without having them on storage.

21104.4k2](/packages/frosh-platform-thumbnail-processor)[dereuromark/cakephp-file-storage

This plugin is giving you the possibility to store files in virtually any kind of storage backend. This plugin is wrapping the Gaufrette library (https://github.com/KnpLabs/Gaufrette) library in a CakePHP fashion and provides a simple way to use the storage adapters through the StorageManager class.

104.1k](/packages/dereuromark-cakephp-file-storage)

PHPackages © 2026

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