N
Neon2y ago
ambitious-aqua

Neon as file Storage?

Hello all, this is silly question, but it's worth asking to be sure. Can we use Neon as a file storage service to store assets like images etc?
7 Replies
ratty-blush
ratty-blush2y ago
Technically yes, but generally you're better off using a service like Amazon S3 to store images. You might store a reference to the image in Neon's Postgres though. The reference would probably be the AWS S3 ARN returned when you upload the image to S3. The ARN is a URL-like string that points to the image in S3, e.g arn:aws:s3:::bucket_name/key_name For smaller use cases though you might be fine with Postgres.
ambitious-aqua
ambitious-aquaOP2y ago
thanks @ShinyPokemon
unwilling-turquoise
unwilling-turquoise2y ago
Why would you want this ? Permissions ? Perf ?
ambitious-aqua
ambitious-aquaOP2y ago
@nikitashamgunov - No, building an app that needs to store images and videos somewhere, and have been considering using various services. I read on the site (Neon.tech) that it does offer 'bottomless storage' - wanted to confirm if it does for sure, that why I asked. Apparently @ShinyPokemon think I'm better off hosting somewhere else.
No description
ratty-blush
ratty-blush2y ago
Not suggesting you shouldn’t use Neon. You would use both Neon and S3, probably.
flat-fuchsia
flat-fuchsia2y ago
What I would suggest, same as Evan, is storing the file in S3 and then storing the id/path of that file in Neon. You will get better performance and bang for your buck that way. Postgres is great but you should use the right tool for the job and postgres is good at relational data but it's not designed as a general purpose object store
ambitious-aqua
ambitious-aquaOP2y ago
Thanks guys, very much appreciated. Happy Holidays

Did you find this page helpful?