Coder Social home page Coder Social logo

上传超过1M文件 about flysystem-cos HOT 4 CLOSED

overtrue avatar overtrue commented on July 18, 2024
上传超过1M文件

from flysystem-cos.

Comments (4)

linyiyuan avatar linyiyuan commented on July 18, 2024

请问你解决了吗,我现在也遇到这个问题

from flysystem-cos.

ljl360197197 avatar ljl360197197 commented on July 18, 2024

编译安装swoole需要加上 --enable-swoole-curl

from flysystem-cos.

vzina avatar vzina commented on July 18, 2024

Hyperf上传大文件建议:
swoole版本:>= 4.8

修改相关方法:

use League\Flysystem\Config;
use Overtrue\Flysystem\Cos\CosAdapter as OCosAdapter;

class CosAdapter extends OCosAdapter
{
    /**
     * @param string   $path
     * @param resource $resource
     * @param Config   $config
     *
     * @return array|false
     */
    public function writeStream($path, $resource, Config $config)
    {
        $options = $this->getUploadOptions($config);

        return $this->getClient()->upload($this->getBucket(), $path, $resource, $options['params']);
    }
}

from flysystem-cos.

overtrue avatar overtrue commented on July 18, 2024

fpm 和 cli 模式下均不能复现,其它模式下请自行适配,先关了。

from flysystem-cos.

Related Issues (20)

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.