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)16306.4k↓52.6%20[8 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 3d 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

34

—

LowBetter than 75% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity46

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

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

[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.7k285.7M1.0k](/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.5M85](/packages/unisharp-laravel-filemanager)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[league/flysystem-bundle

Symfony bundle integrating Flysystem into Symfony applications

40432.5M136](/packages/league-flysystem-bundle)[alexusmai/laravel-file-manager

File manager for Laravel

1.2k803.2k9](/packages/alexusmai-laravel-file-manager)

PHPackages © 2026

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