Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Gaufrette Laravel Package

knplabs/gaufrette

View on GitHub
Deep Wiki
Context7

currentMenu: extras

Gaufrette Extras

Some extra features built on top of Gaufette live in a package separate from the core. It provides:

  • Resolvable filesystem: introduce resolve() method to transform an object path into a URI.

In order to install it:

composer require gaufrette/extras

Resolvable filesystem

Filesystem decorator providing resolve() method to resolve an object path into URI. It uses a resolver (implementing ResolverInterface) to do the resolution.

<?php

use Gaufrette\Filesystem;
use Gaufrette\Adapter\AwsS3;
use Gaufrette\Extras\Resolvable\ResolvableFilesystem;
use Gaufrette\Extras\Resolvable\Resolver\AwsS3PublicUrlResolver;

$client     = // AwsS3 client instantiation
$decorated  = new Filesystem(new AwsS3($client, 'my_bucket', ['directory' => 'root/dir']));
$filesystem = new ResolvableFilesystem(
    $decorated,
    new AwsS3PublicUrlResolver($client, 'my_bucket', 'root/dir')
);

// should return something like "https://eu-west-1.blabla.aws.com/my_bucket/root/dir/foo/bar.png?token
var_dump($filesystem->resolve('foo/bar.png'));

Currently, the following resolvers are implemented. All can be found in the Gaufrette\Extras\Resolvable\Resolver namespace:

  • AwsS3PublicUrlResolver: Create a URL for an object stored on S3 with public ACL.
  • AwsS3PresignedUrlResolver: Create a temporary URL, valid for a given amount of time. Useful when you have to share object(s) with private ACL.
  • StaticUrlResolver: Resolves the object into an URL by concatenating a prefix with object pah.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
ilhamsyabani/laravel-volt-starter
thethunderturner/filament-latex
ghostcompiler/laravel-querybuilder
webrek/laravel-telescope-mongodb
anousss007/blatui
zatona-eg/zatona-eg-api
cocosmos/filament-sticky-save-bar
patrickbussmann/oauth2-apple
3brs/enterprise-security-bundle
anousss007/vigilance
supportpal/eloquent-model
ardenexal/fhir-models
laravel-at/laravel-image-sanitize
romalytar/yammi-audit-log-laravel
ardenexal/fhir-validation
arshaviras/weather-widget
laravel-chronicle/core
sunchayn/nimbus
daikazu/eloquent-salesforce-objects
unseen-codes/chat