如何解决Uppy.ImageEditor插件问题
我正在尝试使用名为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)
})
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。