PHPackages                             nassiry/filesize-handler-googlecloud-extension - 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. nassiry/filesize-handler-googlecloud-extension

ActiveFilesize-handler-extension[File &amp; Storage](/categories/file-storage)

nassiry/filesize-handler-googlecloud-extension
==============================================

Google Cloud extension for FileSizeHandler.

1.0.1(1y ago)11MITPHPPHP &gt;=8.0

Since Jan 7Pushed 1y ago1 watchersCompare

[ Source](https://github.com/nassiry/filesize-handler-google-cloud-extension)[ Packagist](https://packagist.org/packages/nassiry/filesize-handler-googlecloud-extension)[ RSS](/packages/nassiry-filesize-handler-googlecloud-extension/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

PHP FileSizeHandler - Google Cloud Extension
============================================

[](#php-filesizehandler---google-cloud-extension)

[![Packagist Downloads](https://camo.githubusercontent.com/277b2b6cf9ee7056aa4e398cfda806af29100df722c8f31eae48da3f063693d0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e6173736972792f66696c6573697a652d68616e646c65722d676f6f676c65636c6f75642d657874656e73696f6e)](https://camo.githubusercontent.com/277b2b6cf9ee7056aa4e398cfda806af29100df722c8f31eae48da3f063693d0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e6173736972792f66696c6573697a652d68616e646c65722d676f6f676c65636c6f75642d657874656e73696f6e)[![Packagist Version](https://camo.githubusercontent.com/1333d4c30baaf69eff5ff2948a63ec9cbe10f8c57ae20dab1023f4a64a40f303/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e6173736972792f66696c6573697a652d68616e646c65722d676f6f676c65636c6f75642d657874656e73696f6e)](https://camo.githubusercontent.com/1333d4c30baaf69eff5ff2948a63ec9cbe10f8c57ae20dab1023f4a64a40f303/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e6173736972792f66696c6573697a652d68616e646c65722d676f6f676c65636c6f75642d657874656e73696f6e)[![PHP](https://camo.githubusercontent.com/29e76b25f44fd19ba3a88f85f00b3ac7329ffd604075db0fbbeda87f6c794491/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e302d626c7565)](https://camo.githubusercontent.com/29e76b25f44fd19ba3a88f85f00b3ac7329ffd604075db0fbbeda87f6c794491/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e302d626c7565)[![License](https://camo.githubusercontent.com/065952a2aaa336d4a9ef6beb558da191ccc2133a53446cd1f2152fdc1a886d48/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6e6173736972792f66696c6573697a652d68616e646c65722d676f6f676c652d636c6f75642d657874656e73696f6e)](https://camo.githubusercontent.com/065952a2aaa336d4a9ef6beb558da191ccc2133a53446cd1f2152fdc1a886d48/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6e6173736972792f66696c6573697a652d68616e646c65722d676f6f676c652d636c6f75642d657874656e73696f6e)

The **Google Cloud Extension** for [FileSizeHandler](https://github.com/nassiry/filesize-handler) enables support for retrieving file sizes from Google Cloud Storage.

### Features

[](#features)

- Fetch file sizes from Google Cloud Storage.
- Seamlessly integrates with the main [FileSizeHandler](https://github.com/nassiry/filesize-handler) library.

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

[](#installation)

Install the extension via Composer:

```
composer require nassiry/filesize-handler-googlecloud-extension
```

Usage
-----

[](#usage)

```
use Nassiry\FileSizeUtility\FileSizeHandler;
use Nassiry\FileSizeUtility\Extensions\GoogleCloudFiles;
use Google\Cloud\Storage\StorageClient;

$gcsClient = new StorageClient([
    'keyFilePath' => '/path/to/keyfile.json',
]);

$handler = FileSizeHandler::create()
    ->from(new GoogleCloudFiles(
        $gcsClient,         // Google Cloud Storage Client
        'my-bucket',        // Google Cloud bucket name
        'path/to/file.txt'  // File path in the bucket
    ))
    ->format();

echo $handler; // Output: "15.67 MiB"
```

### Contributing

[](#contributing)

Feel free to submit issues or pull requests to improve the package. Contributions are welcome!

### Changelog

[](#changelog)

See [CHANGELOG](CHANGELOG.md) for release details.

### License

[](#license)

This package is open-source software licensed under the [MIT license](LICENSE).

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance48

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 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 ~102 days

Total

2

Last Release

385d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d313e55474ce48c3b19820c784435215bb56c4497557b603583dcf59ba2270c?d=identicon)[nassiry](/maintainers/nassiry)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/nassiry-filesize-handler-googlecloud-extension/health.svg)

```
[![Health](https://phpackages.com/badges/nassiry-filesize-handler-googlecloud-extension/health.svg)](https://phpackages.com/packages/nassiry-filesize-handler-googlecloud-extension)
```

###  Alternatives

[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)[league/flysystem-google-cloud-storage

Google Cloud Storage adapter for Flysystem.

2316.7M45](/packages/league-flysystem-google-cloud-storage)[spatie/flysystem-google-cloud-storage

Flysystem adapter for Google Cloud Storage

25549.6k](/packages/spatie-flysystem-google-cloud-storage)[servd/craft-remote-assets

Move CP assets to an external filesystem such as S3

1215.8k](/packages/servd-craft-remote-assets)

PHPackages © 2026

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