File upload FIlepicker upload_小部件显示两个按钮
嘿,我是《流星》(meteor)上的新手,目前正在尝试上传图像,我发现了File upload FIlepicker upload_小部件显示两个按钮,file-upload,coffeescript,meteor,File Upload,Coffeescript,Meteor,嘿,我是《流星》(meteor)上的新手,目前正在尝试上传图像,我发现了filepicker。我在我的项目中使用了玉把手和咖啡脚本包。 这是密码 咖啡 FILEPICKER_APIKEY = 'Ay67d74M9SgadSy6uXJyu6' Meteor.startup -> console.log 'test client' filepicker.setKey FILEPICKER_APIKEY #filepicker.constructWidget document
filepicker
。我在我的项目中使用了玉把手和咖啡脚本包。
这是密码
咖啡
FILEPICKER_APIKEY = 'Ay67d74M9SgadSy6uXJyu6'
Meteor.startup ->
console.log 'test client'
filepicker.setKey FILEPICKER_APIKEY
#filepicker.constructWidget document.getElementById "upload_widget"
Template.hello.greeting = ->
"Hello World."
Template.hello.events
'click input' : ->
if console?
console.log "You pressed the button"
Template.upload.rendered = ->
filepicker.constructWidget this.find '#upload_widget'
Template.upload.events
'change #upload_widget': (evt) ->
if console?
console.log JSON.stringify(evt.fpfile)
这是test.jade代码
head
title helloworld
body
.container-fluid
.span6
{{> hello}}
.span6
{{> upload}}
template(name="hello")
#test
h1 Hello World!
{{greeting}}
input(type="button", value="Click")
template(name="upload")
input(type="filepicker", id="upload_widget")
现在我的问题是:
似乎出现了两个文件拾取按钮。一个按钮工作正常,可以上传图像,当按下另一个按钮时,控制台显示以下错误未捕获异常:FilepickerException:API键未找到
为什么会出现第二个按钮??
请帮我取下第二个不起作用的按钮。
提前谢谢你