out of disk space - want to host pictures on picasa or flickr
ls129
Joined: 2009-07-17
Posts: 5 |
![]() |
I've been using gallery for several years and have run out of disk space with my web hosting site. I'm looking for a way to keep my gallery site as it is but to have the pictures streamed from a remote source such as flickr or picasa or another cheap web hosting deal such as godaddy. i've been searching the gallery forums for a mod that would allow the image and video files to be sourced NOT from the local disk but from a REMOTE ftp or http source but haven't found anything. I've even considered a linux kernel module that will mount a remote FTP site as a local disk but that seems to require the source code of my current kernel which i dont have @#$ Can you please suggest a solution? my current site is based on gallery2 but i dont mind migrating to gallery3 if that will solve the problem thanks |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Migrating to G3 will require more disk space as it duplicates the images until you remove them from G2. here is a few suggestions: http://codex.gallery2.org/Gallery2:Modules:sizelimit There is a module for using G2 form remote movies ( youtube etc) that would take care of the movies. Dave |
|
nivekiam
![]()
Joined: 2002-12-10
Posts: 16504 |
![]() |
Since I typed this up already in your other thread... BTW, don't be sorry about cross posting, just don't do it Quote:
I'm looking for a way to keep my gallery site as it is but to have the pictures streamed from a remote source such as flickr or picasa or another cheap web hosting deal such as godaddy. Those options? Not possible. I've seen some people using Amazon's S3 service. http://gallery.menalto.com/node/77816 While G3 code base might take up less space and there will probably be less files needed to be cached, if the majority of your site is photos, it's probably not going to save you any time and you'd still end up with a disk space issue as you'd have to install G3 on the same server and have duplicates of your images for a time. |
|
ls129
Joined: 2009-07-17
Posts: 5 |
![]() |
The Amazon S3 trick involves using that the Fuse file system kernel module to mount an Amazon "S3 bucket" i find it incredible that gallery2 which is so well designed didn't take into consideration the possibility of working with remote files or CDNs for that matter. |
|
nivekiam
![]()
Joined: 2002-12-10
Posts: 16504 |
![]() |
Quote:
i find it incredible that gallery2 which is so well designed didn't take into consideration the possibility of working with remote files or CDNs for that matter. This has been brought up many times over the past years. Gallery (and any app like this) needs local file access to the files, period. You could point it to a photo on some other website, but it's going to have to copy that file to your server to process it. If you want an "app" that just point to pictures on other websites, there's notepad, start writing your html and referencing remote images |
|
bharat
![]()
Joined: 2002-05-21
Posts: 7994 |
![]() |
It's possible to do it. We considered it. It complicates the code and most of our users don't need it so we haven't taken the time to write code to support it. If there's a need and/or an elegant solution, we'll consider it. |
|
nivekiam
![]()
Joined: 2002-12-10
Posts: 16504 |
![]() |
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Quote:
or CDNs for that matter. http://gallery.menalto.com/node/36446 Dave _____________________________________________ |
|
ls129
Joined: 2009-07-17
Posts: 5 |
![]() |
Here's an idea. I'd appreciate your help and feedback: 1) put all big jpeg files on a remote host accessible via http or https (w/ password if security is needed). replace/add the image files on the host where gallery2 is installed, for example XXX.jpg with a symbolic link. XXX.jpg -> http://remotehost.com/images/XXX.jpg 2) modify the functions in gallery2 involving reading image files from disk. (open, close, read, lseek etc.) so that if the file type is symbolic link and the symbolic link is of the form "http://.*"), rather than treating it is a file, use some php functions that open http sessions and read from URLs. 3) icons and temporary files can be stored locally. the 80% of the space is taken by the original 5mb jpeg files and videos anyway.. Can that this be done easily ? thanks for your help |
|
bharat
![]()
Joined: 2002-05-21
Posts: 7994 |
![]() |
Yes, it can be done. If somebody does it in a fork on Github, I'll be happy to review and consider it. |
|
ls129
Joined: 2009-07-17
Posts: 5 |
![]() |
can anyone point me in the right direction regarding where centralized file operation take place in gallery2 ? |
|
bharat
![]()
Joined: 2002-05-21
Posts: 7994 |
![]() |
Gallery2's file operation code is centralized in modules/core/classes/GalleryPlatform.class (and its subclasses found near there). We have no centralized file operations in Gallery3. We did that in Gallery2, but it came at a high code complexity overhead. In Gallery3 we keep it simple and use PHP's file operations directly wherever we need them. |
|