Roznoshchik / Lurnby

A tool for active reading and personal knowledge management
https://www.lurnby.com
BSD 3-Clause "New" or "Revised" License
673 stars 17 forks source link

Decouple from Amazon #3

Open Roznoshchik opened 2 years ago

Roznoshchik commented 2 years ago

For storing image content the app currently sends images to amazon s3. This is fine for the web-app version, but if the app is meant to run locally, then it's not necessary.

There should be a flag somewhere to determine if this is supposed to be a web app or an offline app and removes the Amazon dependency if that's the case.

Roznoshchik commented 2 years ago

Think this can likely be solved by doing the following.

  1. Adding an env variable such as UPLOAD_IMAGES=1
  2. Keeping the upload to Amazon code behind an if os.environ.get('UPLOAD_IMAGES'):
  3. changing img src to point to the on disk location of the saved images.