承接 wemxo/filer-bundle 相关项目开发

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

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

wemxo/filer-bundle

最新稳定版本:v1.0.1

Composer 安装命令:

composer require wemxo/filer-bundle

包简介

Useful symfony bundle to manage file storage.

README 文档

README

The filer bundle is a symfony bundle that allow you to manage files storage.

Usage

1- Configuration

# /config/packages/filer.yaml
filer:
    types:
        profile_picture:
            folder: profile_picture
            access: public
            mime_types: [image/jpeg, image/png]
            max_size: 5000000
            filters: [thumbnail]
            apply_watermarK: true
            keep_source: false
            source: thumbnail
        document:
            folder: document
            access: public
            mime_types: [text/plain]
            max_size: 5000000
            filters: ~
            apply_watermarK: false
            keep_source: true
            source: null
    accesses:
        private: 'private_filesystem'
        public: 'public_filesystem'

private_filesystem and public_filesystem should be services alias of Gaufrette\FilesystemInterface. thumbnail must be a defined filter in liip_imagine filter_sets configuration.

2- Example

<?php

namespace App;

use Wemxo/FilerBundle/FilerInput;

classe MyService {
    
    public function __construct(private FilerInterface $filer)
    {
    }
    
    public function testEncryptPassword(string $text): string
    {
        $filerInput = new FilerInput(
            'test.txt',
            'Hello world !',
            'text/plain',
            120,
            'document'
        );
        
        $output = $this->filer->saveFile($input);
    }
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-06-30