https://kotlinlang.org logo
#ktor
Title
# ktor
s

Shubham Singh

02/18/2023, 2:48 PM
Hey everyone Is there a
Firebase Storage
alternative that integrates well with Ktor server? I'm trying to build a hobby project and don't want to depend on something like AWS S3 that will expire within an year and I'll have to change my code then. Sure, I'll have to use S3 only if nothing else works, but I'm dropping a message here just in a hope that I'll find something better. So my only usage right now is going to be getting an image from the user for their profile picture, host it on some online storage solution, get its link, and store that link in a PostgreSQL DB along with that user's other basic details like name, email, etc.
a

ayodele

02/18/2023, 7:25 PM
First of, can you use firebase client libs to upload to the bucket then send the downloadUrl to your server? Secondly, can you use Google drive?? We use Google drive at my company.
s

Shubham Singh

02/18/2023, 7:30 PM
Can we upload files to
Firebase Storage
using Ktor Client though? 🤔 I didn't think it was possible. Do they have any REST endpoints for
Storage
?
And your Google Drive idea seems good! If possible, could you please provide some code sample on how you were able to achieve it? I'd be glad to implement this.
a

ayodele

02/18/2023, 7:31 PM
Can we upload files to Firebase Storage using Ktor Client though? 🤔 I didn't think it was possible. Do they have any REST endpoints for Storage?
I mean using their respective client libraries.
s

Shubham Singh

02/18/2023, 7:32 PM
Ah understood.. that's going to be kinda tricky for me since I'm working on a KMP application that supports Android, Desktop, iOS and JS and Firebase is not available for Desktop devices. Plus, all my business logic implementation is in
commonMain
anyways
Still.. thank you for your answer. I'll look into its possibility in my project
a

ayodele

02/18/2023, 7:34 PM
And your Google Drive idea seems good!
For google drive it's easy to upload from client or server. Which ever way, but we upload from the client.
I can provide an example using Ktor if you like
32 Views