0

I am trying to upload text files using the meteor package CollectionFS. They seem to be successfully loading on the client side. I cannot for the life of me figure out how to read the files. I have tried using .createReadStream and the node package FS's readFile(). If anyone could help point me in the right direction to read these files I would greatly appreciate it.

2 Answers2

0

Figured it out. Call .url() on the FSFile object and use HTTPS("GET", url). You need to allow downloads otherwise you will get a 403 access error. This was the part that I was forgetting.

0

Once uploaded the file object has a url() method that can be used to locate it. You can then use the HTTP package to retrieve it.

Michel Floyd
  • 18,793
  • 4
  • 24
  • 39