承接 mradder/filament-s3-browser 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mradder/filament-s3-browser

Composer 安装命令:

composer require mradder/filament-s3-browser

包简介

Browse and manage S3 buckets directly inside your Filament admin panel.

README 文档

README

Browse and manage S3 buckets directly inside your Filament admin panel.

Filament S3 Browser adds a storage browser to your admin interface so you can view, upload, move, delete, and preview files stored on S3-compatible storage without leaving Filament.

It supports Amazon S3, MinIO, Cloudflare R2, Wasabi, DigitalOcean Spaces, and any other Laravel filesystem disk exposed through the Storage facade.

Features

  • Browse configured Laravel filesystem disks directly inside Filament
  • Navigate folders with breadcrumbs
  • Upload files and create folders
  • Rename, move, delete, and download files
  • Preview images, PDFs, and small text files
  • View metadata for binary files and unsupported previews
  • Generate temporary signed URLs when the disk supports them
  • Copy relative paths and public URLs
  • Search entries in the current directory
  • Switch between table and grid views
  • Sort by name, size, or last modified date
  • Restrict browsing to safe root prefixes
  • Extend authorization with policies or use config fallbacks

Requirements

  • PHP 8.2+
  • Laravel 11 or 12
  • Filament 4+
  • Livewire 3

Installation

Install the package via Composer:

composer require mradder/filament-s3-browser

Publish the configuration file:

php artisan vendor:publish --tag="filament-s3-browser-config"

Register the plugin in your Filament panel provider:

<?php

declare(strict_types=1);

namespace App\Providers\Filament;

use Filament\Panel;
use Filament\PanelProvider;
use MrAdder\FilamentS3Browser\FilamentS3BrowserPlugin;

final class AdminPanelProvider extends PanelProvider
{
    public function panel(Panel $panel): Panel
    {
        return $panel
            ->default()
            ->id('admin')
            ->path('admin')
            ->plugins([
                FilamentS3BrowserPlugin::make(),
            ]);
    }
}

Configuration

The package is configured through config/filament-s3-browser.php.

Example configuration:

<?php

declare(strict_types=1);

return [
    'disks' => [
        's3' => [
            'label' => 'Assets',
            'root' => 'tenants/acme',
            'temporary_urls' => true,
        ],
        'archive' => [
            'label' => 'Archive',
            'root' => 'archive',
            'temporary_urls' => false,
        ],
    ],

    'default_disk' => 's3',

    'permissions' => [
        'view' => true,
        'upload' => true,
        'rename' => true,
        'move' => true,
        'delete' => true,
        'download' => true,
        'create_directory' => true,
        'set_visibility' => true,
    ],

    'temporary_urls' => [
        'enabled' => true,
        'ttl' => 5,
    ],

    'navigation' => [
        'enabled' => true,
        'group' => 'Storage',
        'label' => 'S3 Browser',
        'icon' => 'heroicon-o-cloud',
        'sort' => 50,
    ],

    'preview' => [
        'text_limit_bytes' => 131072,
        'signed_url_ttl' => 5,
    ],

    'upload' => [
        'max_size_kb' => 51200,
    ],
];

Config notes

  • disks is keyed by the Laravel disk names defined in config/filesystems.php
  • root limits the browser to a safe subdirectory on that disk
  • temporary_urls.ttl is expressed in minutes
  • preview.text_limit_bytes controls how much text can be previewed inline
  • upload.max_size_kb controls the upload limit enforced by the Filament page

Example filesystem disks

Any Laravel filesystem disk can be browsed. For S3-compatible services that use Flysystem's S3 driver, your config/filesystems.php may look like this:

'disks' => [
    's3' => [
        'driver' => 's3',
        'key' => env('AWS_ACCESS_KEY_ID'),
        'secret' => env('AWS_SECRET_ACCESS_KEY'),
        'region' => env('AWS_DEFAULT_REGION'),
        'bucket' => env('AWS_BUCKET'),
        'url' => env('AWS_URL'),
        'endpoint' => env('AWS_ENDPOINT'),
        'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
    ],
],

That same pattern works for MinIO, Cloudflare R2, Wasabi, and other S3-compatible providers by changing the credentials, bucket, region, and endpoint values.

Root restrictions

If you set a disk root such as 'root' => 'tenants/acme', the browser will normalize every path and prevent traversal above that prefix.

Temporary URLs

When the disk supports Laravel's temporaryUrl() method, the browser can generate short-lived links for downloads and previews. Image and PDF previews use an internal signed route so private disks can still be previewed safely.

Usage

After installation, a new Filament navigation item appears by default:

Storage -> S3 Browser

From the browser page you can:

  • switch between configured disks
  • navigate folders with breadcrumbs
  • search within the current directory
  • refresh the current listing
  • upload files
  • create folders
  • preview supported file types
  • rename, move, download, and delete files
  • copy relative paths, public URLs, and signed URLs
  • inspect file metadata

Folders are listed before files, and users can switch between a table view and grid view.

Permissions

By default, the package uses the fallback flags in filament-s3-browser.permissions.

For example, this disables uploads and deletes globally:

'permissions' => [
    'upload' => false,
    'delete' => false,
],

If you need user-aware authorization, register a Laravel policy for MrAdder\FilamentS3Browser\Data\BrowserTarget.

Example policy:

<?php

declare(strict_types=1);

namespace App\Policies;

use App\Models\User;
use MrAdder\FilamentS3Browser\Data\BrowserTarget;

final class BrowserTargetPolicy
{
    public function view(User $user, BrowserTarget $target): bool
    {
        return $user->can('media.view');
    }

    public function upload(User $user, BrowserTarget $target): bool
    {
        return $user->can('media.upload');
    }

    public function rename(User $user, BrowserTarget $target): bool
    {
        return $user->can('media.rename');
    }

    public function move(User $user, BrowserTarget $target): bool
    {
        return $user->can('media.move');
    }

    public function delete(User $user, BrowserTarget $target): bool
    {
        return $user->can('media.delete');
    }

    public function download(User $user, BrowserTarget $target): bool
    {
        return $user->can('media.download');
    }
}

Then register the policy in your AppServiceProvider or AuthServiceProvider.

Preview Support

Supported preview types:

Type Behavior
Images Inline preview modal
PDF Opens in a new tab
Text files Inline preview when under preview.text_limit_bytes
Other files Metadata view

Testing

Run the package checks locally with:

composer test
composer analyse
composer format

The automated test suite uses Pest, Orchestra Testbench, and Storage::fake() to cover:

  • listing and nested directories
  • folder creation
  • file uploads
  • renames and moves
  • deletes
  • root restriction safety
  • temporary URLs
  • preview modes
  • unsupported filesystem features
  • authorization fallback and policies

Extending

You can adapt the package by:

  • adding more disks to the browser config
  • scoping each disk to a specific root prefix
  • adjusting preview limits and upload size limits
  • implementing policies for BrowserTarget
  • reusing the service layer in custom package integrations

The core browser logic lives in MrAdder\FilamentS3Browser\Services\FilesystemBrowserService, while previews and authorization are handled by dedicated services.

Screenshots

Screenshot placeholders can be added under docs/images/ as the package UI evolves.

Roadmap

Planned improvements:

  • drag and drop uploads
  • bulk selection actions
  • richer preview support for audio and video files
  • optional visibility editing UI
  • dashboard or widget integration for custom Filament experiences

Contributing

Pull requests are welcome.

Please read CONTRIBUTING.md before submitting changes.

Security

If you discover a security issue, please review SECURITY.md.

License

MIT License. See LICENSE.md.

Support the Project

If this plugin saves you time, consider giving it a GitHub star. It helps other Filament and Laravel developers discover the project.

mradder/filament-s3-browser 适用场景与选型建议

mradder/filament-s3-browser 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 03 月 14 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「filesystem」 「s3」 「laravel」 「livewire」 「filament」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 mradder/filament-s3-browser 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 mradder/filament-s3-browser 我们能提供哪些服务?
定制开发 / 二次开发

基于 mradder/filament-s3-browser 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 18
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-14