织梦DEDECMS后台图片集默认的上传文件的要小于2m,如果超过2m,就显示图片TOO BIG没法上传,许多高清摄影图片背景等等往往比较大会超出2M,那么如何修改DEDECMS织梦图片集上传图片大小2M的限制?
方法如下:
在dede\templets文件夹下有两个文件:
album_add.htm
album_edit.htm
用记事本打开这2个文件,找到有这句代码:
window.onload = function () { swfu = new SWFUpload( { // Backend Settings upload_url: "swfupload.php", post_params: {"PHPSESSID": "<?php echo session_id(); ?>", "dopost" : ""}, // File Upload Settings file_size_limit : "2 MB",// 2MB file_types : "*.jpg; *.gif; *.png", file_types_description : "选择 JPEG/GIF/PNG 格式图片", file_upload_limit : "0", file_queue_error_handler : fileQueueError, file_dialog_complete_handler : fileDialogComplete, upload_progress_handler : uploadProgress, upload_error_handler : uploadError, upload_success_handler : uploadSuccess, upload_complete_handler : uploadComplete, button_image_url : "../images/SmallSpyGlassWithTransperancy_17x18.png", button_placeholder_id : "spanButtonPlaceholder", button_width: 250, button_height: 18, button_text : '<span class="button">选择本地图片 <span class="buttonSmall">(单图最大为 8 MB,支持多选)</span></span>', button_text_style : '.button { font-family: Helvetica, Arial, sans-serif; font-size: 12pt; } .buttonSmall { font-size: 10pt; }', button_text_top_padding: 0, button_text_left_padding: 18, button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT, button_cursor: SWFUpload.CURSOR.HAND, // Flash Settings flash_url : "../images/swfupload/swfupload.swf", custom_settings : { upload_target : "divFileProgressContainer" }, // Debug Settings debug: false }); };
修改成:
file_size_limit : "8 MB",
button_text : '<span class="button">选择本地图片 <span class="buttonSmall">(单图最大为 8 MB,支持多选)</span></span>', 将2MB改成你需要的大小就可以。
如果是会员投稿上传附件的话在后台系统→基本参数→会员设置中修改允许上传附件大小即可。
如对本文有疑问,请提交到交流论坛,广大热心网友会为你解答!! 点击进入论坛