将 Filepicker.IO 与 Meteor 集成 [英] Integrating Filepicker.IO with Meteor

查看:34
本文介绍了将 Filepicker.IO 与 Meteor 集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在检查 Meteor 作为 Web 应用程序的潜在框架,我需要做的一件事是允许我的客户通过该应用程序上传文件.我开始检查 Filepicker.io 作为合并此功能的途径,但我无法让拖放字段呈现.它在测试 Rails 应用程序上运行良好,但在我的演示 Meteor 应用程序上,它看起来就像一个空白的输入框.

I've been checking out Meteor as a potential framework for a web application and one thing I need to be able to do is allow my clients to upload files through the app. I started checking out Filepicker.io as an avenue to incorporate this functionality but I'm having trouble getting the drag/drop field to render. It works fine on a test Rails app but on my demo Meteor app, it just looks like a blank input box.

推荐答案

我通过 wget http://api.filepicker.io/v1/filepicker.js

那我就可以了

meteor.startup ->
  filepicker.setKey 'lalala'

然后通过

Template.fileUpload.rendered = ->  
  filepicker.constructWidget document.getElementById('uploadWidget')

这篇关于将 Filepicker.IO 与 Meteor 集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆