当前位置:网站首页>Ueditor -- limitation of 4m size of image upload component
Ueditor -- limitation of 4m size of image upload component
2022-04-23 10:45:00 【Glacier Technology】
Generally speaking, it's best not to upload website pictures larger than 4M Of , But there are some special cases , If the website needs to upload a large picture for download .

A website maintained now uses ueditor Editor plugin , It is required to upload pictures without restrictions 4M, Therefore, according to the network loading when uploading pictures in the background , Judgment is the limit of foreground control , It's just /ueditor/dialogs/image/ Under the directory image.js and image.html, stay image.html The following configuration variables are found :
var flashOptions = {
container:"flashContainer", //flash Containers id
url:editor.options.imageUrl, // Upload processing page url Address
ext:'{"param1":"value1", "param2":"value2"}', // A list of custom parameters that can be submitted to the server
fileType:'{"description":"'+lang.fileType+'", "extension":"*.gif;*.jpeg;*.png;*.jpg"}', // Upload file format restrictions
flashUrl:'imageUploader.swf', // Upload with flash Component address
width:608, //flash Width
height:272, //flash Height
gridWidth:121, // The width of each preview image
gridHeight:120, // The height of each preview image
picWidth:100, // The width of a single preview image
picHeight:100, // The height of a single preview image
uploadDataFieldName:editor.options.imageFieldName, // POST Image data in the request key
picDescFieldName:'pictitle', // POST The picture in the request describes key
maxSize:4, // The maximum size of the file , Company M
compressSize:2, // If the image volume exceeds this value before uploading , It's compressed first , Company M
maxNum:32, // How many files can be uploaded at a time
compressSide:editor.options.compressSide, // The benchmark of proportional compression ,0 According to the longest side ,1 In order to follow the width ,2 According to the height
compressLength:editor.options.maxImageSideLength // The maximum acceptable side length , Beyond this value Flash It will automatically compress proportionally
};
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
Only need to flashOptions Inside maxSize Just change it to a larger value . In addition, the picture upload component uses flash Compress , Quality cannot be guaranteed , You can put compressSize The value is also increased accordingly , More in line with business needs . The new version (
v>=1.4.2) Of
ueditor Configuration of image upload and so on , Unified in
/ueditor/php/config.json adjustment , Look at the notes and you can change .
版权声明
本文为[Glacier Technology]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230922151000.html
边栏推荐
猜你喜欢

MapReduce compression

JVM - common parameters

Idea - indexing or scanning files to index every time you start

ID number verification system based on visual structure - Raspberry implementation

高价买来的课程,公开了!phper资料分享

【leetcode】102.二叉树的层序遍历

Redis design and Implementation

SQL Server cursor circular table data

Reading integrity monitoring techniques for vision navigation systems - 5 Results

Zhengda international explains what the Dow Jones industrial index is?
随机推荐
59. Spiral matrix (array)
Read LSTM (long short term memory)
202. Happy number
ID number verification system based on visual structure - Raspberry implementation
Configuration of LNMP
Read integrity monitoring techniques for vision navigation systems
JUC concurrent programming 07 -- is fair lock really fair (source code analysis)
209、长度最小的子数组(数组)
454、四数之和(哈希表)
任意文件读取漏洞 利用指南
Chapter I Oracle database in memory related concepts (Continued) (im-1.2)
Jerry's factors that usually affect CPU performance test results are: [article]
Diary of dishes | Blue Bridge Cup - hexadecimal to octal (hand torn version) with hexadecimal conversion notes
RESTful和SOAP的区别
Examination questions and answers of the third batch (main person in charge) of Guangdong safety officer a certificate in 2022
中职网络安全2022国赛之CVE-2019-0708漏洞利用
【省选联考 2022 D2T1】卡牌(状态压缩 DP,FWT卷积)
CentOS/Linux安装MySQL
Chapter 120 SQL function round
707、设计链表(链表)