storing pictures

Anton Lundin glance at acc.umu.se
Sun Oct 25 14:48:00 PDT 2015


On 22 October, 2015 - Dirk Hohndel wrote:

> 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.
> 

One idea i got for not bloating the git repo, is actually chucking the
pictures in a separate git branch, completely separate from our
"dive-data" branch. We could even put thumbs in another branch.

That way we could choose if we would like to just download the
dive-data, thumbs, or even full pictures, just by keeping them in
separate lines of history.

Example is that you only like your dive-data on your cell, but dive-data
+ medium resoulution thumbs on your tablet, meanwhile you got your
dive-data and highres on your laptop.



Another direction to go is to use https://git-annex.branchable.com/



//Anton


-- 
Anton Lundin	+46702-161604


More information about the subsurface mailing list