Ueditor image upload configuration file for Ueditor/php/config.json
/ * Upload picture configuration item * / "Imageactionname":"Uploadimage",/ * Perform the action name of the upload picture * / "Imagefieldname":"Upfile",/ * submitted picture form name * / "Imagemaxsize":2048000,/ * Upload size limit, Unit B * / "Imageallowfiles": [". png",". jpg",". jpeg",". gif",". bmp"],/ * Upload image format display * / "Imagecompressenable":true,/ * Whether to compress the picture, the default is true * / "Imagecompressborder": the,/ * picture compression longest edge limit * / "Imageinsertalign":"None",/ * Insert the picture floating way * / "Imageurlprefix":"http://www.xxx.cn",/ * Picture access Path prefix * / "Imagepathformat":"/uploads/image/{yyyy}{mm}{dd}/{time}{rand:6}",/* Changed path, upload save path, can customize save path and file name format */ / * {filename} will be replaced with the original file name, configure this need to pay attention to the Chinese garbled problem * / / * {Rand:6} will be replaced by random number, followed by the number of digits of the random number * / / * {time} will be replaced with a timestamp */ / * {yyyy} will be replaced by four-digit year * / / * {yy} will be replaced by two-digit year * / / * {mm} will be replaced by two-digit month * / / * {DD} will be replaced with two-bit date * / / * {hh} will be replaced by two-bit hours * / / * {II} will be replaced by two-bit minutes * / / * {SS} will be replaced by two-bit seconds * / /* Illegal characters \: *? "< > | */ /* Body View online documentation: fex.baidu.com/ueditor/#use-format_upload_filename * *
There are two points to note
1, Imagepathformat, picture path format, configure this parameter to set the location where the picture is stored in the server
2, Imageurlprefix, image access path prefix, by configuring this parameter can and Imagepathformat constitute the absolute path of the picture
Example: http://www.xxx.cn/uploads/image/20150710/1436493278975924.jpg
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Ueditor Image Upload Configuration