Firebase Hosting Static Content - Like S3

595 views
Skip to first unread message

Cody Spring

unread,
Sep 9, 2014, 7:56:50 PM9/9/14
to fireba...@googlegroups.com
I know it's been asked, and answered, how Firebase can store user uploaded images as a string. I'm concerned that the data transfer cost of that within the dataset itself would be a... Little high. I'm aware I could upload an image to my own server but in the interest of keeping things client side, are there any plans to allow apps to upload images to Firebase hosting through an API? The filestore limits on the pricing for Firebase hosting suggest a massive amount of files is possible, but access with security rules and a client API would pretty much make my dreams come true. 

Michael Wulf

unread,
Sep 11, 2014, 3:47:00 PM9/11/14
to fireba...@googlegroups.com
Hi Cody!

Support for more advanced blob (i.e. image) storage is definitely on our radar. It's unclear at this point exactly where blobs would be directed as there are a lot of varying use cases here, but I think we're leaning towards Hosting bandwidth/storage for the answer. If you have specifics in mind, we would love to hear more about your use case. Please feel free to email me off-list with exact details about your app and the plan for uploads.

Providing the greased lightning that that our API offers is a complex and costly process, and blobs would be a considerable increase to that infrastructure, so I'm fairly sure any uploads via the API would be subject to bandwidth restrictions.

The data transfer costs are extremely easy to calculate. It's a simple matter of bytes, so you need only take your own analytics or insights for usage and frequency of uploads, and multiply that by the average or maximum image size. Adding 5% for overhead should account for any Firebase meta. 

I think if your use case is fairly standard, you'll find the current approach a little more favorable than you suspect. For example, our free plan would support uploading circa 20k images that were 250k in size per month. The candle plan would happily support 80k images. By way of comparison, filepicker.io charges around $99/mo for 25k files (note that they allow up to 1GB per file, which would free you from optimizing the images for larger uploads like pics taken from the phone).

Cheers,

On Tue, Sep 9, 2014 at 4:56 PM, Cody Spring <codyb...@gmail.com> wrote:
I know it's been asked, and answered, how Firebase can store user uploaded images as a string. I'm concerned that the data transfer cost of that within the dataset itself would be a... Little high. I'm aware I could upload an image to my own server but in the interest of keeping things client side, are there any plans to allow apps to upload images to Firebase hosting through an API? The filestore limits on the pricing for Firebase hosting suggest a massive amount of files is possible, but access with security rules and a client API would pretty much make my dreams come true. 

--
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.

Cody Spring

unread,
Sep 11, 2014, 4:39:04 PM9/11/14
to fireba...@googlegroups.com
Michael,

I appreciate you getting back to me on the subject and it's good to hear it's at least on the radar. I would also love to give you more detailed information on my use case; where can I find your email?

The costs are somewhat easy to calculate, but there are other concerns. Publicly I can say our app has a social aspect to it that allows users to post images with a story, others can comment. Even assuming the average image is 2.5mb that would be a $1.25 (inferno) charge for every 400 (1gb) images; $0.0031 per image. That is however only taking into account the upload itself. If each post (image) is viewed even 10 times it's a $0.031 process, none if this even considering what happens when the database exceeds the 100gb limit (40,000 images). It's hardly sustainable, and a bit crazy compared to any blob store/cdn on the market. I understand why, for the record - firebase itself isn't designed for that kind of thing, I just wish there was a 'firebase-y' way to accomplish this.  

Michael Wulf

unread,
Sep 11, 2014, 4:52:14 PM9/11/14
to fireba...@googlegroups.com
I'm wulf at firebase for personal correspondence.

Just considering the time to download the file, wouldn't 2.5 MB for an image be prohibitive? I think you'd be well ahead to optimize those before uploading. 250k is a much more reasonable upload/download size for mobile--still a bit on the costly side. Filepicker can again put you ahead here as it can do optimizations, cropping, and other cool stuff on the fly.

Send me details for your use case; I'll make sure it's included in the design discussions.

Regards,
Kato

--

Cody Spring

unread,
Sep 11, 2014, 4:53:39 PM9/11/14
to fireba...@googlegroups.com
Fantastic, I'll do that now. Thank you.
Reply all
Reply to author
Forward
0 new messages