承接 superius/filepond 相关项目开发

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

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

superius/filepond

最新稳定版本:v2.0.2

Composer 安装命令:

composer require superius/filepond

包简介

Laravel backend module for filepond uploads

README 文档

README

Laravel FilePond Backend

An all in one Laravel backend for FilePond

We currently support the `process` and `revert` methods and are securing those via the Laravel encryption/decryption methods.

:rocket: Be up and running in 2 minutes

Laravel setup

Require this package in the composer.json of your Laravel project.

composer require superius/filepond

If you need to edit the configuration, you can publish it with:

php artisan vendor:publish --provider="Superius\Filepond\FilepondServiceProvider"
// Get the temporary path using the serverId returned by the upload function in `FilepondController.php`
$filepond = app(\Superius\Filepond\Filepond::class);
$disk = config('filepond.temporary_files_disk');

$path = $filepond->getPathFromServerId($serverId);
$fullpath = Storage::disk($disk)->get($filePath);


// Move the file from the temporary path to the final location
$finalLocation = public_path('output.jpg');
\File::move($fullpath, $finalLocation);

External storage

You can use any Laravel disk as the storage for temporary files. If you use a different disk for the temporary files and the final location, you will need to copy the file from the temporary location to the new disk then delete the temporary file yourself.

If you are using the default local disk, make sure the /storage/app/filepond directory exists in your project and is writable.

Filepond client setup

This is the minimum Filepond JS configuration you need to set after installing filepond.

FilePond.setOptions({
  server: {
    url: '/filepond/api',
    process: '/process',
    revert: '/process',
    patch: "?patch=",
    headers: {
      'X-CSRF-TOKEN': '{{ csrf_token() }}'
    }
  }
});

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-04-19