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)8777.9k↓49.6%29[1 issues](https://github.com/BunnyWay/BunnyCDN.PHP.Storage/issues)1MITPHPPHP ^7.4||^8.0CI passing

Since Dec 14Pushed 7mo 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 yesterday

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 93% of packages

Maintenance50

Moderate activity, may be stable

Popularity48

Moderate usage in the ecosystem

Community26

Small or concentrated contributor base

Maturity53

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

704d 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

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[google/cloud

Google Cloud Client Library

1.2k16.7M57](/packages/google-cloud)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[oat-sa/tao-core

TAO core extension

66143.7k122](/packages/oat-sa-tao-core)

PHPackages © 2026

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