storing pictures

Dirk Hohndel dirk at hohndel.org
Thu Oct 22 05:08:18 PDT 2015


So I've been thinking about this for a while and I'm not sure what we do
right now is the right thing after all.

So when a user adds pictures to their dive file, the dive file itself
should contain information how to find the picture and (possibly?) a
thumbnail of the picture (so if the picture isn't available for whatever
reason, we can at least show a thumbnail.

So what does "information how to find the picture" mean?

- simplest case, it's a file:// url - i.e., where on my local computer
- of course it has a hash which allows us to find it again if it was moved

But Subsurface should have a preference option that allows the user to
specify a network base way to store pictures as well

- cloud storage: pictures are no longer stored as part of the users'
  branch in the git repo - that makes remote operations over super
  slow/bad networks harder and makes the first sync take forever.
  Instead the cloud storage should allow users to upload their pictures
  directly into their picture directory on the cloud server and then to
  download them "on demand" (i.e., if the user clicks on a picture to see
  the full sized version) - but of course look for a local cached copy,
  first. So if I open my repo on my phone it only downloads the picture if
  I tap on it (pictures currently aren't implemented there, anyway).
- Dropbox / Google drive / other shared storage mechanisma: allow in the
  preferences to tell Subsurface how data can be uploaded / downloaded.
  This can be as easy as a subdirectory of the "magic directory" that is
  used for this cloud data storage. And then use hash-based names to find
  the pictures there.

Is this reasonable? What am I missing? I know that Guido has started to
look into this, as has Robert... please comment / make suggestions how the
idea can be improved.

I want pictures to be easy to get to from any device, but I don't want
them to bloat the git repository as they do today.

/D


More information about the subsurface mailing list