Laravel上传大图 [英] Laravel upload Large images

查看:79
本文介绍了Laravel上传大图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过邮递员将大图像上传到服务器(二进制文件上传),它对于2 MB及以下的文件可以正常工作,但是对于大于2 MB的文件,上传失败

I am trying to upload large images to server (binary file upload) via postman, it works fine for files sized 2 MB and below, however for files > 2 MB the upload fails

我设置了 php.ini

upload_max_filesize = 100M post_max_size = 100M

upload_max_filesize = 100M post_max_size = 100M

nginx /etc/nginx/nginx.conf

client_body_buffer_size 100M; client_max_body_size 100M;

client_body_buffer_size 100M; client_max_body_size 100M;

但是它不起作用

我尝试使用 plupload 软件包进行块上传,但是它对于大于2 MB的文件也不起作用

I tried plupload package for chunk upload but it also doesn't work for files > 2 MB

有什么想法可以在laravel中上传大图像吗?

Any ideas how to upload large images in laravel ?

推荐答案

它不起作用,因为设置了错误的php.ini文件 在laravel dd(phpinfo())上执行此操作,并在

It's doen't work because you set the wrong php.ini file do this on laravel dd(phpinfo()) and look the right php.ini use by laravel in the value

已加载的配置文件

Loaded Configuration File

这篇关于Laravel上传大图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆