Giter VIP home page Giter VIP logo

qiniu-laravel-storage's Introduction

Qiniu 云储存 Laravel 5/6/7/8/9 Storage版

基于 https://github.com/qiniu/php-sdk 开发

符合Laravel 5/6/7/8/9 的Storage用法。

注意

 从七牛获取到的putTime时间戳,是以 100纳秒 为单位的。

参考 https://developer.qiniu.com/kodo/api/1308/stat https://developer.qiniu.com/kodo/api/1284/list

 PHP 可以用 Carbon Carbon::createFromTimestampMs($putTime/10000) 来保证最大精度  

JavaScript 可以用 moment moment(putTime/10000) 来保证最大精度  

更新

v9.0 支持 Laravel 9

v0.10 支持“公开空间”的 CDN 时间戳防盗链

v0.9 兼容 Laravel 5.5 的自动包安装功能

v0.8

  1. 修正了getUrl
  2. 修正了最新的 Qiniu API 适配

v0.7

  1. 增加了 withUploadToken, lastReturn 等命令。
  2. 修正了代码内的一些typo

v0.6 增加了fetch, qetag 命令。

v0.5 增加了QiniuUrl来更方便的设置文件 URL 参数。

v0.3 增加了对PIPE以及回调地址参数的配置。 感谢abcsun提供的灵感。

v0.2 提供了对多域名的支持。这是为了配合七牛的默认域名、HTTPS域名和自定义域名而添加的功能。

安装

  • composer require zgldh/qiniu-laravel-storage:0.10.3
  • config/app.php 里面的 providers 数组, 加上一行 zgldh\QiniuStorage\QiniuFilesystemServiceProvider::class
  • config/filesystem.php 里面的 disks数组加上:
    'disks' => [
        ... ,
        'qiniu' => [
            'driver'  => 'qiniu',
            'domains' => [
                'default'   => 'xxxxx.com1.z0.glb.clouddn.com', //你的七牛域名
                'https'     => 'dn-yourdomain.qbox.me',         //你的HTTPS域名
                'custom'    => 'static.abc.com',                //Useless 没啥用,请直接使用上面的 default 项
             ],
            'access_key'=> '',  //AccessKey
            'secret_key'=> '',  //SecretKey
            'bucket'    => '',  //Bucket名字
            'notify_url'=> '',  //持久化处理回调地址
            'access'    => 'public',  //空间访问控制 public 或 private
            'hotlink_prevention_key' => 'afc89ff8bd2axxxxxxxxxxxxxxbb', // CDN 时间戳防盗链的 key。 设置为 null 则不启用本功能。
//            'hotlink_prevention_key' => 'cbab68a279xxxxxxxxxxab509a', // 同上,备用
        ],
    ],
  • 完成

使用

第一种用法

    $disk = \Storage::disk('qiniu');
    $disk->exists('file.jpg');                      //文件是否存在
    $disk->get('file.jpg');                         //获取文件内容
    $disk->put('file.jpg',$contents);               //上传文件
    $disk->put('file.jpg',fopen('path/to/big.jpg','r+')); //分段上传文件。建议大文件>10Mb使用。    
    $disk->prepend('file.log', 'Prepended Text');   //附加内容到文件开头
    $disk->append('file.log', 'Appended Text');     //附加内容到文件结尾
    $disk->delete('file.jpg');                      //删除文件
    $disk->delete(['file1.jpg', 'file2.jpg']);
    $disk->copy('old/file1.jpg', 'new/file1.jpg');  //复制文件到新的路径
    $disk->move('old/file1.jpg', 'new/file1.jpg');  //移动文件到新的路径
    $size = $disk->size('file1.jpg');               //取得文件大小
    $time = $disk->lastModified('file1.jpg');       //取得最近修改时间 (UNIX)
    $files = $disk->files($directory);              //取得目录下所有文件
    $files = $disk->allFiles($directory);               //这个没实现。。。
    $directories = $disk->directories($directory);      //这个也没实现。。。
    $directories = $disk->allDirectories($directory);   //这个也没实现。。。
    $disk->makeDirectory($directory);               //这个其实没有任何作用
    $disk->deleteDirectory($directory);             //删除目录,包括目录下所有子文件子目录
    $disk->url('a.png');                            //返回文件的URL
    $disk->url(['path' => 'a.png', 'domainType' => 'default']); //返回文件的URL

    $disk->getAdapter()->uploadToken();              //获取上传Token
    $disk->getAdapter()->uploadToken('file.jpg');    //获取上传Token

    $disk->getAdapter()->withUploadToken($token);    // 使用自定义的 uploadToken 进行上传,
    $disk->put('file.jpg',$content);                // 则本次的 put 操作,将使用上述的 $token 进行上传。
                                                    // 常用于自动触发持久化处理 https://github.com/qiniu/php-sdk/blob/master/examples/upload_and_pfop.php
    
    $disk->getAdapter()->downloadUrl('file.jpg');                //获取下载地址
    $disk->getAdapter()->downloadUrl('file.jpg')
                      ->setDownload('foo.jpg');                 //获取下载地址,文件名为 foo.jpg
    $disk->getAdapter()->downloadUrl('file.jpg', 'https');       //获取HTTPS下载地址
    $disk->getAdapter()->privateDownloadUrl('file.jpg');         //获取私有bucket下载地址
    $disk->getAdapter()->privateDownloadUrl('file.jpg?attname=foo.jpg');         
                                                                //获取私有bucket下载地址,文件名为 foo.jpg
    $disk->getAdapter()->privateDownloadUrl('file.jpg', 'https');//获取私有bucket的HTTPS下载地址
    $disk->getAdapter()->privateDownloadUrl('file.jpg',
                                        [
                                            'domain'=>'https',
                                            'expires'=>3600
                                        ]);                     //获取私有bucket的HTTPS下载地址。超时 3600 秒。
    $disk->getAdapter()->avInfo('file.mp3');                     //获取多媒体文件信息
    $disk->getAdapter()->imageInfo('file.jpg');                  //获取图片信息
    $disk->getAdapter()->imageExif('file.jpg');                  //获取图片EXIF信息
    $disk->getAdapter()->imagePreviewUrl('file.jpg','imageView2/0/w/100/h/200');                         //获取图片预览URL
    $disk->getAdapter()->privateImagePreviewUrl('file.jpg','imageView2/0/w/100/h/200');                  //获取私有bucket图片预览URL
    $disk->getAdapter()->verifyCallback('application/x-www-form-urlencoded', $request->header('Authorization'), 'callback url', $request->getContent());//验证回调内容是否合法
    $disk->getAdapter()->persistentFop('file.flv','avthumb/m3u8/segtime/40/vcodec/libx264/s/320x240');   //执行持久化数据处理
    $disk->getAdapter()->persistentFop('file.flv','fop','队列名');   //使用私有队列执行持久化数据处理
    $disk->getAdapter()->persistentStatus($persistent_fop_id);       //查看持久化数据处理的状态。
    $disk->getAdapter()->fetch('http://abc.com/foo.jpg', 'bar.jpg'); //调用fetch将 foo.jpg 数据以 bar.jpg 的名字储存起来。
    $disk->getAdapter()->qetag();        //得到最后一次执行 put, copy, append 等写入操作后,得到的hash值。详见 https://github.com/qiniu/qetag
    $disk->getAdapter()->lastReturn();   //得到最后一次执行 put, copy, append 等写入操作后,得到的返回值。

第二种用法 (就是省略了一个getAdapter)

    use zgldh\QiniuStorage\QiniuStorage;

    $disk = QiniuStorage::disk('qiniu');
    $disk->exists('file.jpg');                      //文件是否存在
    $disk->get('file.jpg');                         //获取文件内容
    $disk->put('file.jpg',$contents);               //上传文件
    $disk->put('file.jpg',fopen('path/to/big.jpg','r+')); //分段上传文件。建议大文件>10Mb使用。
    $disk->prepend('file.log', 'Prepended Text');   //附加内容到文件开头
    $disk->append('file.log', 'Appended Text');     //附加内容到文件结尾
    $disk->delete('file.jpg');                      //删除文件
    $disk->delete(['file1.jpg', 'file2.jpg']);
    $disk->copy('old/file1.jpg', 'new/file1.jpg');  //复制文件到新的路径
    $disk->move('old/file1.jpg', 'new/file1.jpg');  //移动文件到新的路径
    $size = $disk->size('file1.jpg');               //取得文件大小
    $time = $disk->lastModified('file1.jpg');       //取得最近修改时间 (UNIX)
    $files = $disk->files($directory);              //取得目录下所有文件
    $files = $disk->allFiles($directory);               //这个没实现。。。
    $directories = $disk->directories($directory);      //这个也没实现。。。
    $directories = $disk->allDirectories($directory);   //这个也没实现。。。
    $disk->makeDirectory($directory);               //这个其实没有任何作用
    $disk->deleteDirectory($directory);             //删除目录,包括目录下所有子文件子目录

    $disk->uploadToken();                           //获取上传Token
    $disk->uploadToken('file.jpg');                 //获取上传Token
    
    $disk->withUploadToken($token);                 // 使用自定义的 uploadToken 进行上传,
    $disk->put('file.jpg',$content);                // 则本次的 put 操作,将使用上述的 $token 进行上传。
                                                    // 常用于自动触发持久化处理 https://github.com/qiniu/php-sdk/blob/master/examples/upload_and_pfop.php
    
    $disk->downloadUrl('file.jpg');                     //获取下载地址
    $disk->downloadUrl('file.jpg')
         ->setDownload('foo.jpg');                      //获取下载地址,文件名为 foo.jpg
    $disk->downloadUrl('file.jpg', 'https');            //获取HTTPS下载地址
    $disk->privateDownloadUrl('file.jpg');              //获取私有bucket下载地址
    $disk->privateDownloadUrl('file.jpg?attname=foo.jpg');         
                                                                //获取私有bucket下载地址,文件名为 foo.jpg
    $disk->privateDownloadUrl('file.jpg', 'https');     //获取私有bucket的HTTPS下载地址
    $disk->privateDownloadUrl('file.jpg',
                            [
                                'domain'=>'https',
                                'expires'=>3600
                            ]);                         //获取私有bucket的HTTPS下载地址。超时 3600 秒。
    $disk->avInfo('file.mp3');                          //获取多媒体文件信息
    $disk->imageInfo('file.jpg');                       //获取图片信息
    $disk->imageExif('file.jpg');                       //获取图片EXIF信息
    $disk->imagePreviewUrl('file.jpg','imageView2/0/w/100/h/200');                          //获取图片预览URL
    $disk->privateImagePreviewUrl('file.jpg','imageView2/0/w/100/h/200');                   //获取私有bucket图片预览URL
    $disk->verifyCallback('application/x-www-form-urlencoded', $request->header('Authorization'), 'callback url', $request->getContent());//验证回调内容是否合法
    $disk->persistentFop('file.flv','avthumb/m3u8/segtime/40/vcodec/libx264/s/320x240');    //执行持久化数据处理
    $disk->persistentFop('file.flv','fop','队列名');    //使用私有队列执行持久化数据处理
    $disk->persistentStatus($persistent_fop_id);        //查看持久化数据处理的状态。

    $disk->fetch('http://abc.com/foo.jpg', 'bar.jpg'); //调用fetch将 foo.jpg 数据以 bar.jpg 的名字储存起来。
    $disk->qetag();     //得到最后一次执行 put, copy, append 等写入操作后,得到的hash值。详见 https://github.com/qiniu/qetag
    $disk->lastReturn();//得到最后一次执行 put, copy, append 等写入操作后,得到的返回值。

官方SDK / 手册

qiniu-laravel-storage's People

Contributors

5-say avatar abcsun avatar bluntblade avatar branchzero avatar callmez avatar django-wong avatar dtynn avatar frowhy avatar hantuo avatar helloeson avatar longbai avatar longshanksmo avatar luoluoluoxiaxia avatar marlonfan avatar milkmeowo avatar mingyoung avatar motian avatar peichao01 avatar rwifeng avatar terranc avatar wenjy avatar xcaptain avatar xushiwei avatar xuzhaokui avatar zgldh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qiniu-laravel-storage's Issues

setDownload() can not rename the file

When I use

$disk->privateDownloadUrl('old', ['domain' => 'xxx', 'expires' => xxx])->setDownload('new')->getUrl();

to rename the file I download, the name is still 'old' without any change.

BTW, I find the url is same whether use setDownload() or not (except token part), does it not work on private bucket?

获取指定空间的文件列表 出错

环境

1、PHP 7.0.7 (cli) (built: Jun  2 2017 14:31:29) ( NTS )

2、"zgldh/qiniu-laravel-storage": "^0.8.0"

3、"laravel/framework": "5.4.*"

报错:

(1/1) ErrorExceptionUndefined offset: 2
--
in QiniuAdapter.php (line 436)
at HandleExceptions->handleError(8, 'Undefined offset: 2', '/vagrant/datang/vendor/zgldh/qiniu-laravel-storage/src/QiniuAdapter.php', 436, array('directory' => 'image', 'recursive' => true, 'bucketMgr' => object(BucketManager), 'items' => array('items' => array(array('key' => 'image/12123123.jpg', 'hash' => 'FqQz0ZXT9qeOErEDc54kEoVC3WI1', 'fsize' => 5560, 'mimeType' => 'image/jpeg', 'putTime' => 15030355030414385, 'type' => 0), array('key' => 'image/35aa0aa4eff6af6e20971e8b8bca9f91.jpeg', 'hash' => 'FqQz0ZXT9qeOErEDc54kEoVC3WI1', 'fsize' => 5560, 'mimeType' => 'image/jpeg', 'putTime' => 15030355295198346, 'type' => 0), array('key' => 'image/583.png', 'hash' => 'Fgk-ysKo3i8VkdNUORx76KIOkdrH', 'fsize' => 21516, 'mimeType' => 'image/png', 'putTime' => 15040840088926407, 'type' => 0), array('key' => 'image/700.png', 'hash' => 'FgejAbuK5m0P-How-m-bnsGO-oxa', 'fsize' => 13985, 'mimeType' => 'image/png', 'putTime' => 15040840595412069, 'type' => 0), array('key' => 'image/738.png', 'hash' => 'Fq99N7s0ZTQ5iY_Me1GK6dKLx8r8', 'fsize' => 21987, 'mimeType' => 'image/png', 'putTime' => 15040784690430097, 'type' => 0), array('key' => 'image/812.png', 'hash' => 'FgepfHIXWrmWRVNaDyRqGBamlifG', 'fsize' => 22693, 'mimeType' => 'image/png', 'putTime' => 15040643336408509, 'type' => 0), array('key' => 'image/a29e0ba43a7be2547b0fc11c3211ee49.jpeg', 'hash' => 'FqQz0ZXT9qeOErEDc54kEoVC3WI1', 'fsize' => 5560, 'mimeType' => 'image/jpeg', 'putTime' => 15034727831122215, 'type' => 0), array('key' => 'image/c475e719822650273c8c075574d73b92.jpeg', 'hash' => 'FqQz0ZXT9qeOErEDc54kEoVC3WI1', 'fsize' => 5560, 'mimeType' => 'image/jpeg', 'putTime' => 15040025801726937, 'type' => 0))), 'marker' => null))in QiniuAdapter.php (line 436)
at QiniuAdapter->listContents('image', true)in Filesystem.php (line 271)
at Filesystem->listContents('image', true)in FilesystemAdapter.php (line 422)
at FilesystemAdapter->files('image', true)in StaticController.php (line 23)
at StaticController->index()

……

定位在这儿,看了看PHP7的 list 函数,和PHP5的不一样。
我删除了 $marker,,把foreach ($items as $item) {改成了foreach ($items['item'] as $item) {

原方法:

    public function listContents($directory = '', $recursive = false)
    {
        $bucketMgr = $this->getBucketManager();

        list($items, $marker, $error) = $bucketMgr->listFiles($this->bucket, $directory);
        if ($error !== null) {
            $this->logQiniuError($error);

            return array();
        } else {
            $contents = array();
            foreach ($items as $item) {
                $normalized = [
                    'type'      => 'file',
                    'path'      => $item['key'],
                    'timestamp' => $item['putTime']
                ];

                if ($normalized['type'] === 'file') {
                    $normalized['size'] = $item['fsize'];
                }

                array_push($contents, $normalized);
            }

            return $contents;
        }
    }

uploadToken

@zgldh
有点疑问,项目中提供了$disk->getDriver()->uploadToken('file.jpg')接口, 但是想传入包含callback的token到上传文件接口中,没有地方可以接收token参数?

PHP7 lumen5.4使用这个包出现异常

QiniuFilesystemServiceProvider第28行\Storage 无法找到 以及 QiniuStorage 22行的\Storage
需要引入use Illuminate\Support\Facades\Storage;后去掉反斜杠才可用。

SAE无法使用,请问怎么回事?

SAE无法使用,请问怎么回事?上传就无效了。一旦在providers中注册之后就无法打开网页,不显示任何错误,显示白板

安装之后使用有报错

报错信息如下:
Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR)
Call to undefined function Qiniu\Http\curl_init()

ubuntu系统已经安装php-curl,并且已经在php.ini中打开了拓展,请问这个是什么问题

listContents 失能

$disk->getDriver()->listContents("2014")
listContents方法传入 201404

service\vendor\league\flysystem\src\Util\ContentListingFormatter.php:108:

return Util::dirname($entry['path']) === $this->directory;

Util::dirname($entry['path']) 为 “20140424/xxxxxx”
$this->directory为 "201404"

因为不相等导致此方法不会返回任何数据

私有空间似乎没有授权?

我的bucket为私有的,在config/filesystem.php中配置了访问控制为私有:

'qiniu' => [
          //省略无关配置
            'access'    => 'private',  //空间访问控制 public 或 private
 ],

但是使用:

$a = \Storage::disk('qiniu');
$b = $a->get('something');

发现会报 401 Authorization Required 错误,追查下来发现代码会走到:QiniuAdapter->read 方法,而 read 直接是用一个 file_get_content($location) 去读取文件,似乎并没有授权这一步呢?

似乎在getAuth方法中会生成授权,但调试了一下,似乎也没有走到getAuth() 方法。

这里我可以确定的是,我的 access => private 参数没有问题,因为我在 QiniuAdapter->__construct 打印出 $this->access 确为 private .

因为对整个laravel 调用流程不太熟悉,这是我能提供的所有信息了,请查看一下 :)

升级不友好

新版本多了个 access 参数,如果旧版本升级就会报错,幸亏我只是部署新项目,但这种做法实在太不成熟了

Undefined index: hash

Qiniu Adapter line 242: Undefined index: hash 请问这是什么情况?文件已经到了qiniu上面 可是上传是报了这个错

composer.json 中 qiniu/php-sdk 的版本号固定为 7.2.7 导致依赖安装不成功

如题。如果项目中已经安装了 qiniu/php-sdk 并且版本不等于 v7.2.7 时,再去安装 zgldh/qiniu-laravel-storage 就会报错。错误内容如下:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Can only install one of: qiniu/php-sdk[v7.2.7, v7.2.9].
    - Can only install one of: qiniu/php-sdk[v7.2.9, v7.2.7].
    - Can only install one of: qiniu/php-sdk[v7.2.7, v7.2.9].
    - zgldh/qiniu-laravel-storage v0.10.2 requires qiniu/php-sdk 7.2.7 -> satisfiable by qiniu/php-sdk[v7.2.7].
    - Installation request for zgldh/qiniu-laravel-storage ^0.10.2 -> satisfiable by zgldh/qiniu-laravel-storage[v0.10.2].
    - Installation request for qiniu/php-sdk (locked at v7.2.9, required as ^7.2) -> satisfiable by qiniu/php-sdk[v7.2.9].


Installation failed, reverting ./composer.json to its original content.

目前 qiniu/php-sdk 的最新版本是 v7.2.9,而项目中锁定依赖版本为 v7.2.7 导致安装失败。

建议将 composer.json 中对 qiniu/php-sdk 的依赖改为 ^7.2

disk名字不能改吗

'disks' => [
        ... ,
        'qiniu' => [
            'driver'  => 'qiniu',
            'domains' => [
                'default'   => 'xxxxx.com1.z0.glb.clouddn.com', //你的七牛域名
                'https'     => 'dn-yourdomain.qbox.me',         //你的HTTPS域名
                'custom'    => 'static.abc.com',                //Useless 没啥用,请直接使用上面的 default 项
             ],
            'access_key'=> '',  //AccessKey
            'secret_key'=> '',  //SecretKey
            'bucket'    => '',  //Bucket名字
            'notify_url'=> '',  //持久化处理回调地址
            'access'    => 'public'  //空间访问控制 public 或 private
        ],
    ],

第一个qiniu不能改的吗?改了后提示“Driver [] is not supported.”

上传图片出现 ErrorException In Config.php line 44 :

ErrorException In Config.php line 44 :
Trying to get property 'srcUpHosts' of non-object

public function getUpHost($accessKey, $bucket)
{
$zone = $this->getZone($accessKey, $bucket);
if ($this->useHTTPS === true) {
$scheme = "https://";
} else {
$scheme = "http://";
}

    $host = $zone->srcUpHosts[0];
    if ($this->useCdnDomains === true) {
        $host = $zone->cdnUpHosts[0];
    }

    return $scheme . $host;
}

查到是这句代码 出现了问题 是应为 ak 和 bucket 没传进去吗

laravel 5.5

最新版上传9m的音频文件错误

Type error: Too few arguments to function Qiniu\\Storage\\ResumeUploader::upload(), 0 passed in F:\\phpStudy\\WWW\\2018\\fufei_read\\vendor\\zgldh\\qiniu-laravel-storage\\src\\QiniuAdapter.php on line 278 and exactly 1 expected

检查发现是 QiniuAdapter 278行$ret = $up->upload();没有传参数 但是七牛官方的方法定了一个参数

/**
     * 上传操作
     */
    public function upload($fname)

希望修正

上传大文件出现错误

我是直接集成到October CSM 的。"Allowed memory size of 120586240 bytes exhausted (tried to allocate 99775249 bytes)"

上传之后的下载地址有误

avatar_11504007614.jpg/fNIcjKJz2sel955xaeTxNSUo6zQU0PTcW3kFUQN6.jpeg

会自动在jpg后面添加上token.jpeg,这是什么鬼啊!

上传自动触发持久化方法

$disk->put('file.jpg',$content, ['token'=>$uploadToken]);
// 使用自定义的 uploadToken 进行上传。
是不是无效?(私有空间操作,对视频加水印处理。)
有看到pull requests
不过 似乎没有更新到master。

--分支使用错误
composer require "zgldh/qiniu-laravel-storage:dev-master"
默认0.6.8版本还没发布的~

情何以堪

文档里面写的在app.conf中加 zgldh\QiniuStorage\QiniuFilesystemServiceProvider 少了个::class,这叫我这新手情何以堪

关于三个url的区别

如题,配置中这三个url有啥区别,底层到底是调用哪一个?

'domains' => [
                'default'   => 'xxxxx.com1.z0.glb.clouddn.com', //你的七牛域名
                'https'     => 'dn-yourdomain.qbox.me',         //你的HTTPS域名
                'custom'    => 'static.abc.com',                //你的自定义域名
             ],

根据实际测试发现,Storage::url调用的是default这个url,但是这里却填写的是七牛的测试域名,这样不合适吧?

虽然可以把default填写成自定义的,那custom是干嘛的

0.10.1 版本的bug:Type error: Too few arguments to function Qiniu\Storage\FormUploader::put()

Laravel 5.5 / php 7.1.29 / qiniu/php-sdk 7.2.8

会有以下错误信息:
Type error: Too few arguments to function Qiniu\Storage\FormUploader::put(), 7 passed in /Users/dongbin/Documents/Workspace/cyzy/customer-service/vendor/zgldh/qiniu-
laravel-storage/src/QiniuAdapter.php on line 266 and exactly 8 expected

查看源码 FormUploader::put() 方法的第8个参数 $checkCrc 并没有使用,删除该参数或者设置默认值 null 或者调用传入 null 均可以正常使用。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.