What does the DB store?

tamcla
tamcla's picture

Joined: 2009-10-14
Posts: 3
Posted: Wed, 2009-10-14 13:10

Hi,

First of let me clarify that I am a NewBie to both PHP and Gallery :)

I am in the process of designing a website, and one of the main features is availability of photo galleries (photos taken over 2-3 decades). The image gallery should include upload for registered users, free browsing But NO download. The requirements are simple. Any web based interface (any color or background) - BUT It should be accessible/maintain multiple users, and have the files stored on the FileSystem (FTP server).

I need help determining if Gallery can fit the bill. I understand from the documentation links that multiple users are supported, but my main concern is will it be able to interface with an FTP server, where the images should be stored using a specific naming convention per user+per category.

Appreciate quick replies and pointers.

Thanks
_T

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2009-10-14 18:37

If that FTP directory is on the same server and Gallery can read from it directly, sure. If it needs to create an FTP connection to the server, nope.

Are you wanting Gallery to auto-import stuff?

Data like titles, descriptions, users, summaries, keywords, etc are stored in the DB (along with a bunch of other stuff). Images are stored in a "g2data" storage directory, other files that are created for the caching mechanism are stored there as well.

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
tamcla
tamcla's picture

Joined: 2009-10-14
Posts: 3
Posted: Thu, 2009-10-15 18:16

Thanks for the quick reply. I am writing some details below.. hopefully it will help give you a clearer picture of the scenario..

Basically due to copyright issues we *might* be restricted to keep the pics/media on secure third-party own FTP servers..whereas we intend to have a simple/minimum maintenance web enabled image management system for our field operatives (shared hosting etc). We will be importing the pics we already maintain using '4images' on our current website, but primarily intend to allow/upgrade our system to allow field operatives direct web uploads for their new pics on the new FTP Servers. The newly uploaded files will be coded and stored on the file system for individual users (or something like that) - so we will probably have multiple folders e.g per user or per category (not decided coding system yet).

Does that make sense?

From what I understand the best approach is to store file names/paths, caching info in the database, but the media on the file system. Hence my question. Is there a way to do the above using Gallery?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Thu, 2009-10-15 18:47
Quote:
Basically due to copyright issues we *might* be restricted to keep the pics/media on secure third-party own FTP servers..

Thanks for the laugh :) FTP is anything but secure. I hope you mean SFTP if you want security.

I still don't get what this has to do with Gallery. Are you people going to upload to an FTP site and then you are going to have someone or something import these into Gallery? Gallery does not have an FTP interface so people can't upload via FTP into gallery, nor can Gallery import images from FTP.

My suggestion, install Gallery and try it out and get a better feel for how it works because I don't understand what we you want to do other than have people upload images to FTP servers. Gallery is intended to display images on a website. Gallery, without hacks, does not automatically read from a directory structure and import images.

You also mention FTP servers, plural. Gallery can only have 1 storage directory, you can import from multiple sources, but you can only have 1 storage directory that has everything Gallery needs to display your images (except for the database and program files)
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Fri, 2009-10-16 00:53
Quote:
free browsing But NO download.

You are aware that when a web browser browses an image, it automatically and necessarily downloads it to the local machine in order to display it? Once you display an image on your computer, it's the work of seconds to find the file in the local browser cache.

Quote:
From what I understand the best approach is to store file names/paths, caching info in the database, but the media on the file system. Hence my question. Is there a way to do the above using Gallery?

Maybe. As Nivekiam says, G2 imports and stores the files in the g2data directory which has to be accessible by file access to the webserver. You can use symlinks, but the original file still has to be within the webserver's directory structure. If you want that to be on a remote server you are stuck using something like NFS to mount the remote volume locally. Try it and see.

Bear in mind that Gallery2 is not a light-weight interface to manage images that already exist in a directory structure, it's a heavy duty web gallery package that mandates the use of its own database and file structure. Once you import a file into G2 you may not muck about within G2's directory structure to manage the images in any way, except via the G2 interface, or API if you want to do some programming.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Fri, 2009-10-16 02:13

Thanks Alec, much better put.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
tamcla
tamcla's picture

Joined: 2009-10-14
Posts: 3
Posted: Fri, 2009-10-16 09:58

Thanks guys....

alecmyers: I concur - much better put ! - appreciate it :)