Home > Backend Development > PHP Tutorial > Solution to error in uploading large files in Ueditor editor under WDCP panel

Solution to error in uploading large files in Ueditor editor under WDCP panel

WBOY
Release: 2016-07-29 09:04:35
Original
1189 people have browsed it

Due to actual needs, there are currently many attachments of more than 20M that need to be uploaded. The website is developed using ThinkPHP, and the rich text editor uses Ueditor. Here are a few places that need to be modified.

Ueditor configuration

Open the config.json file and modify the MaxSize items in it

Configure php.ini in the WDCP panel

Solution to error in uploading large files in Ueditor editor under WDCP panel
I found that many friends asked that it still does not take effect after modifying the above two steps. And I was puzzled at the time. After testing, I found that problems began when the file was uploaded to about 8M. Through the debugging tool of the Chrome browser, I found that the error is probably 413equest Entity Too Large. So I thought that the web engine of wdcp is apache+nginx, and the configuration of nginx is missing.

Configure nginx

<code>cd /www/wdlinux/nginx/conf/
vim nginx.conf</code>
Copy after login

Modify the

<code>client_max_body_size 8m;</code>
Copy after login

client_max_body_size is the maximum number of bytes of a single file allowed to be requested by the client. Remember to restart the web service and then the problem will be solved.

The above introduces the solution to the error in uploading large files in the Ueditor editor under the WDCP panel, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template