承接 erykai/upload 相关项目开发

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

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

erykai/upload

最新稳定版本:v1.4.2

Composer 安装命令:

composer require erykai/upload

包简介

Upload media, files and images

README 文档

README

Maintainer Source Code PHP from Packagist Latest Version Software License Quality Score Total Downloads

Upload media, files, images and upload url

Video Documentation

Installation

Composer:

"erykai/upload": "1.2.*"

Terminal

composer require erykai/upload

Create config.php

//define name folder uploads system
const UPLOAD_DIR = 'storage';
//define mimetypes accepts
const UPLOAD_MIMETYPE = [
    'image/jpeg',
    'image/gif',
    'image/png',
    'image/svg+xml',
    'audio/mpeg',
    'video/mp4',
    'application/msword',
    'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
    'application/pdf'
];

Upload $_FILES

require "config.php";
require "vendor/autoload.php";

use Erykai\Upload\Upload;
$upload = new Upload();
$upload->save();
print_r($upload->response());

Upload $_POST url

require "config.php";
require "vendor/autoload.php";

use Erykai\Upload\Upload;
$upload = new Upload($_POST['cover'], 'cover');
$upload->save();
print_r($upload->response());

Upload url

require "config.php";
require "vendor/autoload.php";

use Erykai\Upload\Upload;
$upload = new Upload('https://web.com/pdf.pdf', 'document');
$upload->save();
print_r($upload->response());

Create object and delete

if($upload->save()){
        $user = new stdClass();
            foreach ($upload->response()->data as $key => $value) {
                $user->$key = $value;
                $file = true;
            }
        }   
        //case delete
        if($file){
           $upload->delete();
           print_r($upload->response());
        }

Delete image

$upload->delete("storage/image/2022/08/10/imagem.jpg");
print_r($upload->response());

Contribution

All contributions will be analyzed, if you make more than one change, make the commit one by one.

Support

If you find faults send an email reporting to webav.com.br@gmail.com.

Credits

License

The MIT License (MIT). Please see License for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-08-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固