Re: [Firebase] Save PDF to Firebase

1,553 views
Skip to first unread message

Tony Meng

unread,
Oct 6, 2014, 1:25:39 PM10/6/14
to fireba...@googlegroups.com
Oliver,

You can use Firebase to house the majority of your data needs, but for hosting fairly large, user generated content, I would recommend storing these on S3, Google Cloud Storage, or a service of the like and having a reference to them on Firebase. And yes, you can store files locally using fs in your node app (see: https://stackoverflow.com/questions/2496710/writing-files-in-nodejs). 

When you say "pushed the app to firebase", are you talking about the static asset portion of it? Firebase hosts your static assets, but does not run any applications on your behalf (nodejs, etc, see https://www.firebase.com/docs/hosting/quickstart.html). To run your own application, check out services like heroku (https://www.heroku.com/). Also, if you can manage to generate the PDF's on the client side (see http://parall.ax/products/jspdf or other similar solutions), perhaps you don't need to run a node server. If that's the case, you can upload files from the client directly to S3 and save a reference to Firebase. 

Hope this helps, let me know if you have any more questions.
Tony

On Sun, Oct 5, 2014 at 12:01 PM, Obf73 <oliver.fr...@gmail.com> wrote:

I am creating PDF documents in an angular application using firebase. Am I able to save the documents in the local filesystem of my webapp with my node server using the node 'fs' library or do I need to convert the documents and save them as a different format in the database? would it be easier to save them with AWS and have a reference to that AWS path in firebase?

I had the application working locally by having my node server add a folder to the webapp filesystem, having the paths as data in firebase, and then the angular application was able to pull from the path I created in the local filesystem. I pushed the app to firebase and it is no longer working. I am assuming that my node server code to create folders in the firebase local filesystem is not working. is it possible to look at the filesystem of my firebase application to see if it is working? I am wondering if (a.) it is possible to write to the firebase filesystem like i am or if i am doing it incorrectly, (b.) if there is a better way to be doing this.

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages