Open Martinsos opened 1 month ago
My comment from discussion:
Huh that would be interesting indeed!
It is a bit specific though hm, doesn't sound like a feature to add to the core language of Wasp.
But maybe concept of FileStorage would be interesting, and then you can choose S3, Azure Blob, ... . Ok yeah that is actually what you said, I get it now! Ok, that would be quite interesting, you are right.
I wonder what the right name would be. FileStorage? Storage?
We could have a way to say we want to have Storage, and it can be Dummy for start, and then as you said it can be S3 or sometihng else. We would need to have abstraction layer over it though. I wonder if a library for this already exists. And they would still need to be able to access it under the hood when needed (and use e.g. specific S3 options).
I think this is a bit wild idea, I am not sure if we should do it or not, but it is interesting, and merits further investigation. It could be cool! FileStorage indeed is part of many web apps, and why wouldn't we abstract it?
Name for this is actually "Object Storage" from what I read a bit, or just Storage.
I found this library that abstracts it (among other stuff): https://github.com/pkgcloud/pkgcloud?tab=readme-ov-file#storage .
This sounds like an interesting idea! Since we are suggesting to our users the usage of object storage vs. using the local file system to keep the app portable, it makes sense to offer first-party support for object storage.
Using S3-compatible API could be interesting as there are many that support it:
Aha, so S3 became kind of a standard -> ok, that is also an option then! Although it would be nice to also support Azure and GCP as two big providers.
Interest from user on Discord: https://discord.com/channels/686873244791210014/1245951215192375417/1246086398445092904 .
A file storage system direct integration using s3 buckets [Which can have relation with the database too, like storing user avatar in s3 bucket and linked to database field]
Discussed in https://github.com/wasp-lang/wasp/discussions/1988