【问题标题】:Issue with Uppy.ImageEditor pluginUppy.ImageEditor 插件的问题
【发布时间】:2020-12-10 12:29:02
【问题描述】:

我正在尝试使用名为 uppy.io(https://uppy.io/) 的图片上传插件。它在内部使用图像编辑器插件(https://uppy.io/docs/image-editor/)。所以我在尝试使用Uppy.ImageEditor 时面临的问题是它在控制台中返回Expected a plugin class, but got undefined.。知道为什么会这样吗?下面是我正在使用的代码。任何帮助将不胜感激。

var uppy = Uppy.Core()
    .use(Uppy.Dashboard, {
      inline: true,
      target: '#drag-drop-area',
      height: 300,
      metaFields: [
        { id: 'name', name: 'Name', placeholder: 'file name' },
        { id: 'caption', name: 'Caption', placeholder: 'describe what the image is about' }
      ]
    })
    .use(Uppy.Webcam, { target: Uppy.Dashboard })
    .use(Uppy.Instagram, { target: Uppy.Dashboard, companionUrl: 'https://companion.uppy.io' })
    .use(Uppy.ImageEditor, { 
        target: Uppy.Dashboard,
        id: 'ImageEditor',
        quality: 0.8,
        cropperOptions: { 
            viewMode: 1,
            background: false,
            autoCropArea: 1,
            responsive: true
        }
    })
    .use(Uppy.Tus, {endpoint: 'https://master.tus.io/files/'})
    
uppy.on('complete', (result) => {
    console.log('Upload complete! We’ve uploaded these files:', result.successful)
})

【问题讨论】:

  • 最好尝试社区论坛并分享您如何加载 Uppy 及其插件,完整代码。
  • @kvz 说了什么。论坛在这里community.transloadit.com/c/uppy/5我担心可能不是所有你使用的插件都正确导入?
  • @kvz user511202,谢谢大家。我去那里看看。

标签: javascript jquery jquery-plugins uppy


【解决方案1】:

强文本

Uppy 还不允许 CDN 包这样做,但我们可以使用 react js 实现这一点

【讨论】:

  • 正如目前所写,您的答案尚不清楚。请edit 添加其他详细信息,以帮助其他人了解这如何解决所提出的问题。你可以找到更多关于如何写好答案的信息in the help center
猜你喜欢
  • 2013-12-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2010-12-03
  • 2013-04-17
  • 1970-01-01
相关资源
最近更新 更多