camino-school / lanttern

Lanttern project repo
MIT License
1 stars 0 forks source link

base file upload support #152

Closed endoooo closed 4 months ago

endoooo commented 4 months ago

for future features, like learning evidences

endoooo commented 4 months ago

I tried to implement the upload feature using Storj, but I'll abort this idea for now.

this is a good post/topic for reference: https://elixirforum.com/t/metamorphic-early-access-is-using-elixir/41021/4

the reason I'm aborting the implementation with Storj for now is because 1) image transformation is important, and 2) the need for a more sophisticated architecture to serve the files with security in mind. I want to implement encryption on Lanttern (client) side, as well as using the Storj encryption — in order to do this, I'd need to

  1. download the encrypted file from Storj
  2. decrypt the file using our key
  3. transform the file (if image)
  4. cache and serve the file (maybe with ETS, as in the mentioned post)

I'll continue using Supabase Storage for now, and we can try to migrate to Storj in the future