ueditor1.4.3 PHP version using modified image upload path

Source: Internet
Author: User
Tags rar

The instantiation editor must take something.

Header section
<script type= "Text/javascript" charset= "Utf-8" src= "ueditor.config.js" ></script> <script type= " Text/javascript "charset=" Utf-8 "src=" Ueditor.all.min.js "> </script>

Page Body Section

<textarea id= "editor" name= "Content" style= "width:700px;height:300px;" ></textarea>//Please note the ID name

<script type= "Text/javascript" >
Ue.geteditor (' editor '); Name must have been with the above
</script>

Use the name value to get the upload information

Configure picture file information in Ueditor1_4_3-utf8-php/php/config.json
"Imagepathformat": "/ueditor/php/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}",
The original
"Imagepathformat": "/public/ueditor/php/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}",
I'll put all the pictures uploaded to the public within easy to manage
This is what you need to configure to change to the path you need.


Here are all the configuration files, the comments are very detailed

/* Front-end communication-related configuration, comments allow only multiline mode */
{
/* upload picture Configuration item */
"imageactionname": "Uploadimage",/* Execute action name of upload picture */
"I Magefieldname ":" Upfile ",/* submitted picture form name */
" imagemaxsize ": 2048000,/* Upload size limit, Unit B */
" imageallowfiles ": [". png ",". JPG ",". jpeg ",". gif ",". bmp "],/* Upload picture format display */
" imagecompressenable ": true,/* whether to compress pictures, default is true */
" Imagecompressbor Der ": 1600,/* picture compression longest edge limit */
" imageinsertalign ":" None ",/* * Insert Picture Floating mode */
" Imageurlprefix ":" ",/* Picture access Path prefix */
" Imagepathformat ":"/ueditor/php/upload/image/{yyyy}{mm}{dd}/{time}{rand:6} ",/* Upload save path, can customize save path and file name format */
/* { filename} will be replaced with the original file name, configure this to be aware of the problem of Chinese characters */
/* {rand:6} will be replaced by random number, the following number is the number of digits of the random number */
/* {time} will be replaced by timestamp */
/* {yyyy} will be replaced by four-bit Year */
/* {yy} will be replaced by two-bit year */
/* {mm} will be replaced by two-digit month */
/* * {DD} will be replaced by two-bit date */
/* {HH} will be replaced by two hours */
/* {II} will be replaced two-bit minutes */
/* {SS} will be replaced with two-bit seconds */
/* Illegal characters \: *? "< > | */
/* Body View online documents: fex.baidu.com/ueditor/#use-format_upload_filename */

/* Doodle Picture Upload configuration item */
"Scrawlactionname": "Uploadscrawl",/* Perform the action name of the upload doodle */
"Scrawlfieldname": "Upfile", */* submitted picture form name */
"Scrawlpathformat": "/ueditor/php/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}",/* Upload save path, you can customize save path and file name format */
"Scrawlmaxsize": 2048000,/* Upload size limit, Unit B */
"Scrawlurlprefix": "",/* Image access Path prefix */
"Scrawlinsertalign": "None",

/* Tool Upload */
"Snapscreenactionname": "Uploadimage",/* Perform the uploaded action name */
"Snapscreenpathformat": "/ueditor/php/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}",/* Upload save path, you can customize save path and file name format */
"Snapscreenurlprefix": "",/* Image access Path prefix */
"Snapscreeninsertalign": "None",/* Insert Picture floating way */

/* Crawl remote Picture configuration */
"catcherlocaldomain": ["127.0.0.1", "localhost", "img.baidu.com"],
"Catcheractionname": " Catchimage ",/* Perform the action name of the FETCH remote picture */
" catcherfieldname ":" Source ",/* submitted picture List form name */
" Catcherpathformat ":"/ Ueditor/php/upload/image/{yyyy}{mm}{dd}/{time}{rand:6} ",/* Upload save path, can customize save path and file name format */
" Catcherurlprefix ":" ",/* Picture Access Path Prefix */
"catchermaxsize": 2048000,/* Upload size limit, Unit B */
"catcherallowfiles": [". png", ". jpg", ". jpeg", ". gif", ". B MP "],/* Crawl picture format display */

/* Upload video Configuration */
"videoactionname": "Uploadvideo",/* * Perform the action name of the uploaded video */
"videofieldname": "Upfile",/* submitted video form name */
"Videopathformat": "/ueditor/php/upload/video/{yyyy}{mm}{dd}/{time}{rand:6}",/* Upload save path, you can customize save path and file name format */
"Videourlprefix": "",/* Video access Path prefix */
"videomaxsize": 102400000,/* Upload size limit, Unit B, default 100MB */
"videoallowfiles": [
. flv, ". swf", ". mkv", ". avi", ". Rm", ". rmvb", ". Mpeg", ". mpg",
". Ogg", ". Ogv", ". mov", ". wmv", ". mp4", ". WebM", ". mp3", ". wav", ". Mid"],/* Upload video format display */

/* Upload file Configuration */
"fileactionname": "UploadFile",/* controller, perform the action name of the uploaded video */
"filefieldname": "Upfile",/* File Form name */
"Filepathformat": "/ueditor/php/upload/file/{yyyy}{mm}{dd}/{time}{rand:6}",/* Upload save path, You can customize save path and file name format */
"Fileurlprefix": "",/* File access Path prefix */
"filemaxsize": 51200000,/* Upload size limit, Unit B, default 50MB */
"FileA Llowfiles ": [
". png ",". jpg ",". jpeg ",". gif ",". bmp ",
". flv ",". SwF ",". mkv ",". avi ",". Rm ",". rmvb ",". Mpeg ",". MPG ",
". Ogg ",". Ogv ",". mov ",". wmv ",". mp4 ",". WebM ",". mp3 ",". wav ",". Mid ",
". rar ",". ",". zip ",". Tar ",". Gz ",". 7z ",". bz2 ",". Cab ",". ISO ",
". Doc ",". docx ",". xls ",". xlsx ",". ppt ",". pptx ",". pdf ",". txt ",". MD ",". xml "
],/* Upload file Format display */

/* Lists the pictures under the specified directory */
"imagemanageractionname": "ListImage",/* Perform picture management action name */
"Imagemanagerlistpath": "/ ueditor/php/upload/image/",/* Specify the directory to list pictures */
" imagemanagerlistsize ": 20,/* Number of files per list */
" Imagemanagerurlprefix " : "",/* Image access Path prefix */
"imagemanagerinsertalign": "None",/* Insert Picture Floating mode */
"imagemanagerallowfiles": [". png", ". jpg", ". jpeg", ". gif", ". bmp"],/* File types listed */

/* List files under the specified directory */
"Filemanageractionname": "ListFile",/* Perform file management action name */
"Filemanagerlistpath": "/ueditor/php/upload/file/",/* Specifies the directory to list the files */
"Filemanagerurlprefix": "",/* File access Path prefix */
"Filemanagerlistsize": 20,/* Number of files per list */
"Filemanagerallowfiles": [
". png", ". jpg", ". jpeg", ". gif", ". bmp",
". flv", ". SwF", ". mkv", ". avi", ". Rm", ". rmvb", ". Mpeg", ". mpg",
". Ogg", ". Ogv", ". mov", ". wmv", ". mp4", ". WebM", ". mp3", ". wav", ". Mid",
". rar", ". zip", ". Tar", ". Gz", ". 7z", ". bz2", ". Cab", ". ISO",
". Doc", ". docx", ". xls", ". xlsx", ". ppt", ". pptx", ". pdf", ". txt", ". MD", ". xml"
]/* File types listed */

}





ueditor1.4.3 PHP version using modified image upload path

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.