PHPackages                             akamai-open/netstorage - 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. akamai-open/netstorage

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

akamai-open/netstorage
======================

Akamai NetStorage

0.2.0(7y ago)16292.0k↑10.2%20[5 issues](https://github.com/akamai/NetStorageKit-PHP/issues)[1 PRs](https://github.com/akamai/NetStorageKit-PHP/pulls)Apache 2.0PHPPHP &gt;=5.5

Since Sep 18Pushed 4y ago9 watchersCompare

[ Source](https://github.com/akamai/NetStorageKit-PHP)[ Packagist](https://packagist.org/packages/akamai-open/netstorage)[ RSS](/packages/akamai-open-netstorage/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (9)Versions (4)Used By (0)

Akamai NetStorage for PHP
=========================

[](#akamai-netstorage-for-php)

Important
---------

[](#important)

Akamai does not maintain or regulate this package. While it can be incorporated to assist you in API use, Akamai Technical Support will not offer assistance and Akamai cannot be held liable if issues arise from its use.

Overview:
---------

[](#overview)

This library provides the following NetStorage tools

- a [FlySystem](http://flysystem.thephpleague.com) adapter for NetStorage ObjectStore (`\Akamai\NetStorage\ObjectStoreAdapter`) and FileStore (`\Akamai\NetStorage\FileStoreAdapter`)
- a request signer (`\Akamai\NetStorage\Authentication`)
- a [Guzzle](http://guzzlephp.org) middleware for transparently signing requests to the API (`\Akamai\NetStorage\Handler\Authentication`)

To Do:
------

[](#to-do)

- A PHP streams layer, so you can use `netstorage.fs://path` with *any* built-in I/O functions (e.g. `fopen`, `fread()`, and `fputs`, or `file_get_contents()` and `file_put_contents()`)

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

[](#installation)

Installation is done via `composer`:

```
$ composer require akamai-open/netstorage

```

Using the Request Signer
------------------------

[](#using-the-request-signer)

```
$signer = new Akamai\NetStorage\Authentication();
$signer->setKey($key, $keyName);
$signer->setPath('/' .$cpCode. '/path/to/file');
$signer->setAction('upload');
$headers = $signer->createAuthHeaders();

/*
Return:
[
    'X-Akamai-ACS-Auth-Data' => $authData,
    'X-Akamai-ACS-Auth-Sign' => $signature
];
*/
```

Using the Guzzle Middleware
---------------------------

[](#using-the-guzzle-middleware)

To use the middle, add it to the handler stack in the `\GuzzleHttp\Client` or `\Akamai\Open\EdgeGrid\Client` options:

```
$signer = new \Akamai\NetStorage\Authentication();
$signer->setKey($key, $keyName);

$handler = new \Akamai\NetStorage\Handler\Authentication();
$handler->setSigner($signer);

$stack = \GuzzleHttp\HandlerStack::create();
$stack->push($handler, 'netstorage-handler');

$client = new \Akamai\Open\EdgeGrid\Client([
    'base_uri' => $host,
    'handler' => $stack
]);

// Upload a file:
// Request signature is added transparently
// All parent directories must exist (e.g. /path/to)
$client->put('/' . $cpCode . '/path/to/file', [
    'headers' => [
        'X-Akamai-ACS-Action' => 'version=1&action=upload&sha1=' .sha1($fileContents)
    ],
    'body' => $fileContents
]);
```

### Using the FlySystem Adapters

[](#using-the-flysystem-adapters)

The simplest way to interact with NetStorage ObjectStore or FileStore is using the `\Akamai\NetStorage\ObjectStoreAdapter` or `\Akamai\NetStorage\FileStoreAdapter` for [FlySystem](http://flysystem.thephpleague.com).

```
$signer = new \Akamai\NetStorage\Authentication();
$signer->setKey($key, $keyName);

$handler = new \Akamai\NetStorage\Handler\Authentication();
$handler->setSigner($signer);

$stack = \GuzzleHttp\HandlerStack::create();
$stack->push($handler, 'netstorage-handler');

$client = new \Akamai\Open\EdgeGrid\Client([
    'base_uri' => $host,
    'handler' => $stack
]);

$adapter = new \Akamai\NetStorage\ObjectStoreAdapter($client, $cpCode);
$fs = new \League\Flysystem\Filesystem($adapter);

// Upload a file:
// cpCode, action, content signature, and request signature is added transparently
// Additionally, all required sub-directories are created transparently
$fs->write('/path/to/file', $fileContents);
```

Please note that $key, $keyName &amp; $host can be obtained from "NetStorage API Information" page: [https://control.akamai.com/storage/customer\_portal.jsp?content\_page=ns\_api\_info.jsp](https://control.akamai.com/storage/customer_portal.jsp?content_page=ns_api_info.jsp)

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity47

Moderate usage in the ecosystem

Community21

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.3% 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 ~1325 days

Total

2

Last Release

2569d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/950c044ac0c43c20172483e6cd7c13afed5976380e86dad6308cc4a667329b27?d=identicon)[dshafik](/maintainers/dshafik)

---

Top Contributors

[![dshafik](https://avatars.githubusercontent.com/u/58074?v=4)](https://github.com/dshafik "dshafik (26 commits)")[![m1ch0pv](https://avatars.githubusercontent.com/u/1401050?v=4)](https://github.com/m1ch0pv "m1ch0pv (2 commits)")[![akalcosmin](https://avatars.githubusercontent.com/u/69596993?v=4)](https://github.com/akalcosmin "akalcosmin (1 commits)")[![danielstonies](https://avatars.githubusercontent.com/u/12230000?v=4)](https://github.com/danielstonies "danielstonies (1 commits)")[![nickdietel](https://avatars.githubusercontent.com/u/2080496?v=4)](https://github.com/nickdietel "nickdietel (1 commits)")[![sumoanand](https://avatars.githubusercontent.com/u/4482461?v=4)](https://github.com/sumoanand "sumoanand (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/akamai-open-netstorage/health.svg)

```
[![Health](https://phpackages.com/badges/akamai-open-netstorage/health.svg)](https://phpackages.com/packages/akamai-open-netstorage)
```

###  Alternatives

[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.6k263.6M790](/packages/league-flysystem-aws-s3-v3)[unisharp/laravel-filemanager

A file upload/editor intended for use with Laravel 5 to 10 and CKEditor / TinyMCE

2.2k3.3M74](/packages/unisharp-laravel-filemanager)[league/flysystem-local

Local filesystem adapter for Flysystem.

225231.8M39](/packages/league-flysystem-local)[league/flysystem-bundle

Symfony bundle integrating Flysystem into Symfony applications

40129.5M87](/packages/league-flysystem-bundle)[league/flysystem-sftp-v3

SFTP filesystem adapter for Flysystem.

6129.6M91](/packages/league-flysystem-sftp-v3)[league/flysystem-memory

In-memory filesystem adapter for Flysystem.

8533.6M194](/packages/league-flysystem-memory)

PHPackages © 2026

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