定制 yunusemrebaloglu/chunk-upload 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

yunusemrebaloglu/chunk-upload

最新稳定版本:v1

Composer 安装命令:

composer require yunusemrebaloglu/chunk-upload

包简介

A Laravel package for chunk upload.

README 文档

README

ChunkUpload allows the chunked uploading and merging of files to be uploaded. You can customize it to fit your own design with an example InertiaJs component. It performs the upload process into the specified disk. If there is a route specified in the upload process, it uses that route. If you want to delete, it removes the relevant file. If you activate automatic deletion, it performs the deletion process based on the minute you have specified or the data on the config.

NOTE: We recommend specifying a special disk for the deletion process. All files in the specified directory will be affected!

Installation

You can install ChunkUpload via Composer. Run the following command in your Laravel project directory:

composer require yunusemrebaloglu/chunk-upload

Configuration

To publish the package's configuration file, run the following command:

php artisan vendor:publish --tag=chunk-upload-config

This will copy the configuration file to your config directory where you can customize it.

php artisan vendor:publish --tag=chunk-upload-inertia-components

This will copy the configuration file to the InertiaJs component 'components' directory where you can customize it.

Usage

For the Chunk Upload process, first include the relevant component.

import FileUpload from "@/Components/FileUpload.vue";

You can perform design and editing operations via the relevant component.

<FileUpload v-model="form.file_name"></FileUpload>

This component can work with v-model.

After the file is uploaded, you can process the file on the disk you have provided via the config with this name.

Storage::disk('custom_disk')->makeDirectory($model->id . '/files/');

File::move(Storage::disk('The disk name you specified via config')->path($request->file_name), Storage::disk('listing')->path($model->id . '/files/' . $request->file_name));

Delete Files

NOTE: We recommend specifying a special disk for the deletion process. All files in the specified directory will be affected!

The command below retrieves files from the disk you specified. It compares with the time specified in minutes on the config. If the time has passed, it deletes the files.

php artisan chunk-upload:delete_files

License

ChunkUpload is open-sourced software licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-01-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固