Coder Social home page Coder Social logo

Comments (5)

hehaibao avatar hehaibao commented on June 27, 2024 1

from arteditor.

lgc1994 avatar lgc1994 commented on June 27, 2024

同问

from arteditor.

hehaibao avatar hehaibao commented on June 27, 2024

示例代码,可以参考一下,uploadUrl是接口路径,uploadField是上传图片的字段(post时会作为参数传过去)

$content.artEditor({
        imgTar: '#uploadfile', //图片上传按钮
        limitSize: 5, //默认限制图片最大5兆
        showServer: true, //显示从服务端返回的图片,默认是显示本地资源的图片
        uploadUrl: '/upload/steam',
        uploadField: 'image_code', //上传图片字段
        beforeUpload: function(code) {
            //上传前, 处理base64格式
            return code.split(',')[1];
        },
        uploadSuccess: function(result) {
            //上传成功后的操作
            toast('上传成功');
        },
        uploadError: function(status, error) {
            //这里做上传失败的操作
            toast(status);
        }
    });

from arteditor.

ha321456 avatar ha321456 commented on June 27, 2024

我也需要大神来个吧

from arteditor.

siliushi avatar siliushi commented on June 27, 2024

已经上传

from arteditor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.