Skip to content

Uediter support spring upload and support Alibaba Cloud Storage

Notifications You must be signed in to change notification settings

jackpanz/ueditor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

uediter

  • Support spring mvc upload
  • Support spring boot upload
  • Support local storage
  • Support Alibaba Cloud Storage

Download

Gradle:

dependencies {
  implementation 'com.github.jackpanz:ueditor:1.0.0'
}

Maven:

<dependency>
    <groupId>com.github.jackpanz</groupId>
    <artifactId>ueditor</artifactId>
    <version>1.0.0</version>
</dependency>

Usage

Configure your Controller url

  • /ueditoru/editor.config.js
...
window.UEDITOR_CONFIG = {
    UEDITOR_HOME_URL: URL
, serverUrl:window.location.protocol  + "//" + window.location.host + "/ueditor/controller"
...

Local storage

@ResponseBody
@RequestMapping(value = "/ueditor/aliyun", method = {RequestMethod.POST, RequestMethod.GET})
public String aliyun(HttpServletRequest request) {
    String value = new ActionEnter(request, new LocalSpringFileManager(
            new File("D:/java/nginx-1.15.8/html"),
            "http://localhost/")
    ).exec();
    return value;
}

Alibaba Cloud

@ResponseBody
@RequestMapping(value = "aliyun", method = {RequestMethod.POST, RequestMethod.GET})
public String aliyun(HttpServletRequest request) {

    if ( isLoad++ == 0) {
        OSSConfig.image_access = "http://xxx.aliyuncs.com/";
        OSSConfig.accessKeyId = "accessKeyId";
        OSSConfig.accessKeySecret = "accessKeySecret";
        OSSConfig.endpoint = "endpoint";
        OSSConfig.bucketName = "bucketName";
    }

    String value = new ActionEnter(request, new OSSSpringFileManager()).exec();
    return value;
}

About

Uediter support spring upload and support Alibaba Cloud Storage

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages