【问题标题】:Meteor - file download with meteor-files package ( ostrio:files)Meteor - 使用流星文件包下载文件( ostrio:files )
【发布时间】:2016-08-06 12:19:02
【问题描述】:

我需要一些有关流星文件包的帮助 我在这里https://github.com/VeliovGroup/Meteor-Files/tree/master/demo-simplest-download-button 关注最简单的下载演示并获得一些保险杠。首先是代码:

this.Books = new Meteor.Files({
  debug: true,
  collectionName: 'Books'
});

// To have sample file in DB we will upload it on server startup:
if (Meteor.isServer) {
  Books.denyClient();
  Books.collection.attachSchema(Books.schema);

  Meteor.startup(function () {
    if (true) {
      Books.load('http://localhost:3000/file.pdf', {
        fileName: 'file.pdf',
        meta: {}
      });
    }
  });

  Meteor.publish('Books', function () {
    return Books.find().cursor;
  });

} else {

  Meteor.subscribe('Books');
}
  1. 问题 - 当我从 git 中 c/p 代码时,如果

(!Images.find().count())

哪个流星只是无法识别为函数并在那里中断。正如您在代码中看到的那样,我只需将其替换为 TRUE 即可解决此问题

  1. 问题是现在一切都在运行并且我的文件已成功导入,但我可以在服务器日志中看到他无法找到文件导致:

    [FilesCollection] [加载] 收到:http://localhost:3000/file.pdf I20160806-14:00:27.190(2)? [FilesCollection] [加载] [插入] file.pdf -> 书籍 I20160806-14:00:29.360(2)? [FilesCollection] [查找(未定义)] I20160806-14:00:33.045(2)? [FilesCollection] [查找(未定义)]

【问题讨论】:

    标签: meteor


    【解决方案1】:

    该软件包已过期,需要我的流星更新。如果有人需要

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-06-12
      • 2015-12-03
      • 2014-12-17
      • 2020-03-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多