PHPackages                             ipunkt/fileproxy-client - 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. ipunkt/fileproxy-client

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

ipunkt/fileproxy-client
=======================

Client library for fileproxy application

1.1.1.2(9y ago)01.3kMITPHPPHP &gt;=5.3.2

Since May 4Pushed 8y ago2 watchersCompare

[ Source](https://github.com/ipunkt/fileproxy-client)[ Packagist](https://packagist.org/packages/ipunkt/fileproxy-client)[ RSS](/packages/ipunkt-fileproxy-client/feed)WikiDiscussions master Synced 2w ago

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

fileproxy-client
================

[](#fileproxy-client)

[![Latest Stable Version](https://camo.githubusercontent.com/747725360268f923abeb950486fc1d6cc2609df12cf77390d9688e6e489a1f0c/68747470733a2f2f706f7365722e707567782e6f72672f6970756e6b742f66696c6570726f78792d636c69656e742f762f737461626c652e737667)](https://packagist.org/packages/ipunkt/fileproxy-client) [![Latest Unstable Version](https://camo.githubusercontent.com/aa63585ab3a2bab785c5606246060a2f0d54513f5a56ccae19bf8457dc3d0891/68747470733a2f2f706f7365722e707567782e6f72672f6970756e6b742f66696c6570726f78792d636c69656e742f762f756e737461626c652e737667)](https://packagist.org/packages/ipunkt/fileproxy-client) [![License](https://camo.githubusercontent.com/ce6f4b45d542e0ccc634c8262a04b6c5cfb38bc50d8a1e9325b9c58a2765406d/68747470733a2f2f706f7365722e707567782e6f72672f6970756e6b742f66696c6570726f78792d636c69656e742f6c6963656e73652e737667)](https://packagist.org/packages/ipunkt/fileproxy-client) [![Total Downloads](https://camo.githubusercontent.com/5bdb547c696fb8022aff32c6b2792ca76150a75181f8db46f9e861842b135939/68747470733a2f2f706f7365722e707567782e6f72672f6970756e6b742f66696c6570726f78792d636c69656e742f646f776e6c6f6164732e737667)](https://packagist.org/packages/ipunkt/fileproxy-client)

A client library for fileproxy

Quickstart
----------

[](#quickstart)

```
composer require ipunkt/fileproxy-client

```

Usage
-----

[](#usage)

Setting up our client.

```
$client = new \Guzzle\Http\Client();

$fileproxy = new \Ipunkt\Fileproxy\FileproxyClient('https://file-proxy.app', $client);
```

### Setting Credentials

[](#setting-credentials)

Since version 1.1.0 the fileproxy has the ability to protect api calls with a secret token header. You can add that to the client like so

```
$fileproxy->setCredentials('S3cr3T');
```

Or, you can configure another header name than the default one:

```
$fileproxy->setCredentials('S3cr3T', 'X-ANOTHER-SECURITY-TOKEN-NAME');
```

### Setting Headers

[](#setting-headers)

Another security level can be added by adding custom http headers for each request. So your infrastructure can verify the request by parsing them. You can achieve this like so:

```
$fileproxy->addHeader('X-HEADER', 'custom value');
```

### Files resource

[](#files-resource)

Files resource handles all stuff with the related proxy files. These files are the source for the aliases provided by the service.

#### Uploading a new file

[](#uploading-a-new-file)

```
$fileToUpload = new \SplFileInfo('/absolute/file/path.ext');

/** @var \Ipunkt\Fileproxy\Entities\File $file */
$file = $fileproxy->files()->store($fileToUpload);
```

`$file` is a File entity with the main information about the file itself - the reference.

#### Updating an uploaded file

[](#updating-an-uploaded-file)

```
$reference = 'UUID-FROM-LOCAL-STORAGE';
$fileToUpload = new \SplFileInfo('/absolute/file/path.ext');

/** @var \Ipunkt\Fileproxy\Entities\File $file */
$file = $fileproxy->files()->update($reference, $fileToUpload);
```

`$file` is a File entity with the main information about the file itself - the reference.

#### Storing a remote file

[](#storing-a-remote-file)

```
$url = 'https://domain.tld/images/picture.jpg';

/** @var \Ipunkt\Fileproxy\Entities\File $file */
$file = $fileproxy->files()->storeRemote($url);
```

`$file` is a File entity with the main information about the file itself - the reference.

#### Updating a stored remote file

[](#updating-a-stored-remote-file)

```
$reference = 'UUID-FROM-LOCAL-STORAGE';
$url = 'https://domain.tld/images/picture.jpg';

/** @var \Ipunkt\Fileproxy\Entities\File $file */
$file = $fileproxy->files()->updateRemote($reference, $url);
```

`$file` is a File entity with the main information about the file itself - the reference.

#### Requesting a file by reference

[](#requesting-a-file-by-reference)

```
/** @var \Ipunkt\Fileproxy\Entities\File $file */
$file = $fileproxy->files()->get($reference);// $reference is a UUID4
```

`$file` is a File entity. You can fetch the hits from it for example.

### FileAlias resource

[](#filealias-resource)

You can create or retrieve aliases with this resource.

#### Creating an alias

[](#creating-an-alias)

```
/** @var \Ipunkt\Fileproxy\Entities\Alias $alias */
$alias = $fileproxy->fileAliases($reference /* only once needed */)->create('limited-file.jpg', 5 /* hits only */);// $reference is a UUID4
```

The created `$alias` will be returned and includes the download url and the alias id.

#### Fetching all aliases

[](#fetching-all-aliases)

```
/** @var \Ipunkt\Fileproxy\Entities\Alias[]|array $aliases */
$aliases = $fileproxy->fileAliases($reference /* only once needed */)->all();// $reference is a UUID4
```

You can iterate over all existing `$aliases`.

### Alias resource

[](#alias-resource)

Alias resource handles requesting and deleting of aliases.

#### Requesting an alias

[](#requesting-an-alias)

```
/** @var \Ipunkt\Fileproxy\Entities\Alias $alias */
$alias = $fileproxy->alias()->get($aliasId);// $aliasId = "${reference}.${alias}"
```

`$alias` is an Alias entity. The main information about an alias is the download url and the hits and hits left statistics data.

#### Deleting an alias

[](#deleting-an-alias)

```
$fileproxy->alias()->delete($aliasId);// $aliasId = "${reference}.${alias}"
```

Alias was deleted when no exception was thrown.

### Statistics resource

[](#statistics-resource)

#### Requesting statistics

[](#requesting-statistics)

```
/** @var \Ipunkt\Fileproxy\Entities\Statistic $stats */
$stats = $fileproxy->statistics()->stats();
```

`$stats` returns the main statistics for the current service: size in bytes, file and alias count serving and hits summarized.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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

Every ~13 days

Total

4

Last Release

3304d ago

Major Versions

0.0.1 → 1.1.02017-06-02

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4946056?v=4)[Robert Kummer](/maintainers/rokde)[@rokde](https://github.com/rokde)

---

Top Contributors

[![brauni182](https://avatars.githubusercontent.com/u/8652453?v=4)](https://github.com/brauni182 "brauni182 (1 commits)")

### Embed Badge

![Health badge](/badges/ipunkt-fileproxy-client/health.svg)

```
[![Health](https://phpackages.com/badges/ipunkt-fileproxy-client/health.svg)](https://phpackages.com/packages/ipunkt-fileproxy-client)
```

###  Alternatives

[aws/aws-sdk-php

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

6.2k532.1M2.5k](/packages/aws-aws-sdk-php)[google/cloud

Google Cloud Client Library

1.2k16.5M57](/packages/google-cloud)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[fof/upload

The file upload extension for the Flarum forum with insane intelligence.

190185.4k17](/packages/fof-upload)

PHPackages © 2026

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