Announcement

  •  » Engine
  •  » Piwigo using cloud storage for _data/galleries and _data/uploads.

#1 2023-10-11 05:35:26

viosca
Member
St. Paul, MN US
2019-07-22
7

Piwigo using cloud storage for _data/galleries and _data/uploads.

Greetings,
The What:
I'm looking at modifying piwigo to support using cloud services (Google, AWS, etc) using the php FlySystem for image storage (_data/galleries and _data/upload).

The Why:
  Limits:
    I maintain 3 websites with probably 100K photos and this bloats up substantially with all the derivative sizes. Thus it is easy to exceed the filesystem inode limits on many hosting plans.
  Maintenance:
    It is most annoying to use WebDav to navigate/maintain filesystems from CPanel when one could simply use google desktop or other desktop filesystem software.
  Wasteful:
    It is wasteful to have to maintain, many, separate copies of images on the webserver and in the photo scanning/processing environment. Keeping track of all these copies is problematic. Keeping the metadata (EXIF/IPTC) in sync also a big problem.

The How:
  I am considering using the FlySystem as a generic way of accessing the image datastore. It is written in php. It provides a uniform way of accessing offsite/cloud data storage to multiple storage platforms/protocols using a common infrastructure with plugin adapters for the different storage platforms. It also provides a "local" adapter.

Piwigo appears to use php-builtin fopen style access for everything from reading and writing files to reading EXIF data (it uses (the exec exiftool model for writing metadata).

One way I've considered implementing this is to override the php fopen style functions to a layer that checks if the storage is designated through the FlySystem and perform the necessary auth steps and provide the data.
Both php and FlySystem provide a stream interface, but I don't know if they are compatible yet.
Not sure if php filtering would be applicable here.

Currently I am experimenting with the Google Drive API FlySystem Adapter.
It is very easy to run the access through a service account and access a shared folder from your Google Drive, thus limiting access to only a folder of your Google Drive Space.

Any thoughts you all might have on the implementation, suggestions, etc would be greatly appreciated.

-Randy Viosca

Offline

 
  •  » Engine
  •  » Piwigo using cloud storage for _data/galleries and _data/uploads.

Board footer

Powered by FluxBB

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