add from server module

peterbarlow2000

Joined: 2011-12-06
Posts: 4
Posted: Mon, 2012-03-12 14:35

I would like to add my large collection of photos to gallery3...so I've tried using the 'add from server' module. It all seems to work but I have a concern.

I have over 60GB of photos and when I 'add' them gallery3 creates a duplicate of all the photos in the /var/albums directory which seems a bit wasteful. Wouldn't it make more sense (given that the photos are already on the same server) to make symlinks to the original files instead? Maybe I've missed the point somewhere. I would like my web gallery to provide a 'view' to the photos already on my hard drive. So when I delete/move/add a photo from the hard drive the gallery is automatically updated.

I might try modifying the code if anyone can point my in the right direction.

Many thanks,
Peter.

Ubuntu Server 11.10
Gallery3.02

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2012-03-12 14:41

Moved from the G2 forums.
There was some talk about a symlink module but I have not seen any recent talk about it.
I guess the best place to see how it could be done is the http://codex.gallery2.org/Gallery3:Modules:aws_s3 module where it uses a Amazon S3 service.

Dave
____________________________________________
Blog & G2 || floridave - Gallery Team

 
peterbarlow2000

Joined: 2011-12-06
Posts: 4
Posted: Wed, 2012-03-14 15:36

I went a different way in the end. What I wanted was really simple, so I bashed out a few lines of PHP myself. My code just recursively scans the photos on my server and creates a web page from them using thumbnails and caching. No modifications to the photos can be made from the web page but any changes on the disk are directly mirrored onto the web page.

Thanks for the tip tho floridave
Peter.

 
techjohnny

Joined: 2012-04-05
Posts: 10
Posted: Thu, 2012-04-12 17:33

Please post the code? So, once the photos are mirrored, you can remove them from the local storage?

 
peterbarlow2000

Joined: 2011-12-06
Posts: 4
Posted: Fri, 2012-04-13 07:39

I'm happy to post my code if it helps but just to clarify what it does first....Each time the page is requested from the server, the server scans the directory and builds a web page based on it's findings. (thumbnails are cached just for speed). If there are no files (photos) on the server then nothing will be shown on the resulting web page.
Peter.

 
Niko_K

Joined: 2012-09-04
Posts: 1
Posted: Tue, 2012-09-04 14:48

I do have the same kind of problem here. I have got 80GB of pictures on my server and i want to add these pictures using gallery3.
In gallery2 this was very easy by just selecting "add as symlink" when working with files from the local server, but in the gallery3 module "server add" there isn't such an option.

Has this functionality been lost with gallery3? Is there an other way to add photos to galleries using symlinks in gallery3?
@peterbarlow2000: Maybe you could post your script here, although i am not quite sure if it really offers the functionality i am looking for (does your script generate the date from the file system everytime it is called? wouldn't it be better to add the pictures to the db?)

niko