Announcement

#1 2015-04-07 21:21:24

hwtech
Member
2015-04-07
2

Alt image Caching, upload folder bypass

First of all thanks to the piwigo team.  After evaluating several web based image gallery (DAM) solutions Piwigo is the one.

So I have an install functioning (on an AMI Ubuntu Instance).   All is good.   

My biggest issue is that I can't have piwigo doing any significant storage on the EBS volume (as that is spendy).   

So I have set up s3fs and mounted an S3 bucket as the "galleries" folder and then added a folder in there "upload" and made a symbolic link to the original upload folder.  That way everything is really getting stored at S3.  So far so good.  Seems to work.  I can even add images/folders to the bucket directly and then sync them in!   This is much better than using the s3 plugin.

So now I have some related questions to my issue.

1.  Can I set piwigo up so the uploads folder be totally bypassed and uploads go to the actual physical folder/album in galleries as chosen in the upload dialog?   As far as I can divine an uploaded image gets physically placed in "upload" and if you choose an album it's not really placed physically there rather the DB just gets a pointer to that picture from that album.  For various reasons of maintainability, usability, portability I want every image to have a "real"/base album it lives in (an album matching a filesystem folder name) even if it is linked to other albums.    Mostly I plan to bring in photos directly through the bucket using sync so not a big issue, but I can see occasions where someone will use the upload feature and I am not keen to go back later and move them into their "home" album in galleries and sync them especially if other data in the DB gets attached to them before I move it.

2.  I understand that  all alternate sized images are created on fly and put in a cache in _data?   I'll need to control this cache as once again I am concerned about space on my EBS volume.   Is there a setting for a max cache size?  Is there a way to automate dumping of the cache.     Was it determined that on the fly creation was better than storing the various versions along with the original? 

3.  In general I can't have piwigo storing any blobs or other large binary type objects in the database itself (for same reason of space on EBS volume).  It seems it doesn't??

Thanks again,  I have other non-related questions but it seems best to make a separate post for each.


Piwigo version: 2.7.4
PHP version:  5.5.9
MySQL version:  5.6.23, community
Piwigo URL: http://photos.healthwrights.org

Offline

 

#2 2016-04-16 02:04:41

mapper
Guest

Re: Alt image Caching, upload folder bypass

I am trying to get s3fs to work with Piwigo like you described, but I'm running into permission errors.  I enabled "allow_other" in fuse.conf, and mounted with:

sudo s3fs -o allow_other,use_cache=/tmp/cache mybucket /mnt/s3

then i create a symlink in galleries to this folder. I also tried mounting directly to galleries folder, but with the same issue. Only root has access to the folder, and piwigo doesn't see its contents.

Any help would be appreciated!

 

#3 2016-04-16 02:22:49

mapper
Guest

Re: Alt image Caching, upload folder bypass

disregard... i got it working by adding -o umask=0002 to the s3fs command.

 

#4 2016-04-16 08:35:42

deheme
Member
France
2014-12-12
104

Re: Alt image Caching, upload folder bypass

Hi hwtech

1. may be  the post here will give you some hints?
2. Same for _data

Code:

// the local data directory is used to store data such as compiled templates,
// plugin variables, combined css/javascript or resized images. Beware of
// mandatory trailing slash.
$conf['data_location'] = '_data/';
 
// where should the API/UploadForm add photos? This path must be relative to
// the Piwigo installation directory (but can be outside, as long as it's
// reachable from your webserver).
$conf['upload_dir'] = './upload';

All that stuff are described in local configuration and can be overrided  thru localfileeditor.

Also, there are parameters in  admin panel to select the derivative sizes you want to make available.

3. I dont know if it answers to your concern but  I have >20000 pics and the DB is <15MB

Enjoy!
DéHème

Last edited by deheme (2016-04-16 08:38:24)

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact