Code Monkey home page Code Monkey logo

Comments (10)

big-camel avatar big-camel commented on June 3, 2024 1

import CustomUpload from './xxxx'

const customUpload = new CustomUpload()
customUpload.setGlobalUpload(engine)

from am-editor.

big-camel avatar big-camel commented on June 3, 2024

https://editor.aomao.com/config/upload

from am-editor.

tenglongwentian avatar tenglongwentian commented on June 3, 2024

https://editor.aomao.com/config/upload

这个今天凌晨的时候看了,参考单个插件上传“以 ImageUploader 为例”,其中在“handleUpload”中植入了外部上传组件触发逻辑,但是却没有阻止默认的原有逻辑机制,比如两次弹出文件选择对话框,而且植入的外置组件是异步分块上传的,上传结果不会马上返回。

from am-editor.

big-camel avatar big-camel commented on June 3, 2024

from am-editor.

tenglongwentian avatar tenglongwentian commented on June 3, 2024

全局的也在文档那个下方------------------------------------------------------------------ @.> 日 期:2024年03月25日 20:37:33 @.> @.>; @.> 主 题:Re: [red-axe/am-editor] 如何重写编辑器 engine.request.upload 方法 (Issue #375) https://editor.aomao.com/config/upload 这个今天凌晨的时候看了,参考单个插件上传“以 ImageUploader 为例”,其中在“handleUpload”中植入了外部上传组件触发逻辑,但是却没有阻止默认的原有逻辑机制,比如两次弹出文件选择对话框,而且植入的外置组件是异步分块上传的,上传结果不会马上返回。 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

看到这个了https://editor.aomao.com/zh-CN/config/upload#%E5%85%A8%E5%B1%80%E4%B8%8A%E4%BC%A0
但是属实没看懂,重写后咋植入生效,重新创建一个ts文件然后参考植入?

from am-editor.

big-camel avatar big-camel commented on June 3, 2024

from am-editor.

tenglongwentian avatar tenglongwentian commented on June 3, 2024

如果你有仔细看会发现在 setGlobalUpload 方法里面 有 engine.request.upload = async ... 的覆盖操作------------------------------------------------------------------ @.> 日 期:2024年03月25日 20:43:42 @.> @.>; @.> 主 题:Re: [red-axe/am-editor] 如何重写编辑器 engine.request.upload 方法 (Issue #375) 全局的也在文档那个下方------------------------------------------------------------------ @.> 日 期:2024年03月25日 20:37:33 @.> @.>; @.> 主 题:Re: [red-axe/am-editor] 如何重写编辑器 engine.request.upload 方法 (Issue #375) https://editor.aomao.com/config/upload 这个今天凌晨的时候看了,参考单个插件上传“以 ImageUploader 为例”,其中在“handleUpload”中植入了外部上传组件触发逻辑,但是却没有阻止默认的原有逻辑机制,比如两次弹出文件选择对话框,而且植入的外置组件是异步分块上传的,上传结果不会马上返回。 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.> 看到这个了https://editor.aomao.com/zh-CN/config/upload#%E5%85%A8%E5%B1%80%E4%B8%8A%E4%BC%A0 但是属实没看懂,重写后咋植入生效,重新创建一个ts文件然后参考植入? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.>

image
这段并未输出console.log('setGlobalUpload', engine)
image
这个是触发外置上传组件

from am-editor.

big-camel avatar big-camel commented on June 3, 2024

from am-editor.

tenglongwentian avatar tenglongwentian commented on June 3, 2024

这个只是个自定义方法,你要自己调用------------------------------------------------------------------ @.> 日 期:2024年03月25日 20:53:13 @.> @.>; @.> 主 题:Re: [red-axe/am-editor] 如何重写编辑器 engine.request.upload 方法 (Issue #375) 如果你有仔细看会发现在 setGlobalUpload 方法里面 有 engine.request.upload = async ... 的覆盖操作------------------------------------------------------------------ @.> 日 期:2024年03月25日 20:43:42 @.> @.>; @.> 主 题:Re: [red-axe/am-editor] 如何重写编辑器 engine.request.upload 方法 (Issue #375) 全局的也在文档那个下方------------------------------------------------------------------ @.> 日 期:2024年03月25日 20:37:33 @.> @.>; @.> 主 题:Re: [red-axe/am-editor] 如何重写编辑器 engine.request.upload 方法 (Issue #375) https://editor.aomao.com/config/upload 这个今天凌晨的时候看了,参考单个插件上传“以 ImageUploader 为例”,其中在“handleUpload”中植入了外部上传组件触发逻辑,但是却没有阻止默认的原有逻辑机制,比如两次弹出文件选择对话框,而且植入的外置组件是异步分块上传的,上传结果不会马上返回。 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.> 看到这个了https://editor.aomao.com/zh-CN/config/upload#%E5%85%A8%E5%B1%80%E4%B8%8A%E4%BC%A0 但是属实没看懂,重写后咋植入生效,重新创建一个ts文件然后参考植入? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.> image.png (view on web) 这段并未输出console.log('setGlobalUpload', engine) image.png (view on web) 这个是触发外置上传组件 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

咋调用o(╥﹏╥)o

from am-editor.

tenglongwentian avatar tenglongwentian commented on June 3, 2024

import CustomUpload from './xxxx'

const customUpload = new CustomUpload() customUpload.setGlobalUpload(engine)

自定义图片上传组件,实现了自定义图片文件上传。组件级别的,上传每个都需要重写吗?

from am-editor.

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.