Hi,
i was wondering if Amazon S3 support is somehow possible, or at least via hack.
I thought about doing the following:
- mount S3 in local server filesystem
- phocagallery stores the files automatically to amazon s3
- create dns entry for images.yourdomain which represents amazon s3
- tell phocagally to pull the pictures from images.yourdomain ... gallery/name/pictures
Basically it wouldn't be that big of a deal by just changing the url generation though Joomla is quite a little bit a mess. So i wasn't able to find the function for creating the url of a picture/thumbnail. I'll have to invest more time in the files of phocagallery. But maybe someone could guide me in the right direction.
Chris
Amazon S3 support
-
xpla
- Phoca Newbie

- Posts: 7
- Joined: 14 Mar 2009, 21:38
Re: Amazon S3 support
Anyway. Got a working solution and it rocks 
- Jan
- Phoca Hero

- Posts: 49149
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Amazon S3 support
For now I don't have any experiences with tihs
so cannot give any clue advice there 
Jan
Jan
If you find Phoca extensions useful, please support the project
-
xpla
- Phoca Newbie

- Posts: 7
- Joined: 14 Mar 2009, 21:38
Re: Amazon S3 support
It's an unobtrusive "hack" where no source code is touched.
I let phoca gallery create the gallery and the according thumbs, move the files to amazon and replace the files on the server where phoca is located with 0byte files.
A htaccess file does the magic and pulls the images from Amazon.
A more elegant solution will be if links will be natively created for Amazon S3 though i really lost myself in the source code of Coda as it's, sorry to say that, a little bit messy.
Though if wanted we could team up as i'd be happy to develope a solution for natively store files to S3 (as it's also possible to push files via PHP to S3, so no native file storage required, except temp files).
I let phoca gallery create the gallery and the according thumbs, move the files to amazon and replace the files on the server where phoca is located with 0byte files.
A htaccess file does the magic and pulls the images from Amazon.
A more elegant solution will be if links will be natively created for Amazon S3 though i really lost myself in the source code of Coda as it's, sorry to say that, a little bit messy.
Though if wanted we could team up as i'd be happy to develope a solution for natively store files to S3 (as it's also possible to push files via PHP to S3, so no native file storage required, except temp files).
- Jan
- Phoca Hero

- Posts: 49149
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Amazon S3 support
Hi, yes, if you will have a solution for this, just paste it here to forum.
Will be great.
Thank you, Jan
Will be great.
Thank you, Jan
If you find Phoca extensions useful, please support the project
-
sfam2708
- Phoca Newbie

- Posts: 8
- Joined: 18 Sep 2013, 12:13
Re: Amazon S3 support
Hi the simplest way to handle phoca gallery with amazon support is by using for example ja amazon component it's easy and simple. However there remains one problem even though the transfer of files is successfully transferred and transmitted back to the website and works 100%. If then the local files are deleted from the local server. The local database entries are also deleted therefore when an image is called up there is no record in the database and the callback fails.
The database reference must remain on deletion because it contains the reference to amazon.
There is also another main issue forgetting about amazon. When a file is deleted the database entry is removed but all the images remain in the image folder leaving the image folder with obsolete or no required images on a large site this creates major problems with backups and space. Also if a image with the same file name gets uploaded at a later time the upload files because the obsolete image exists in the image directory. In this case the correct code is required to remove the image from the image directory when a image is deleted.
In short in this day and age using a cloud storage platform is not only required but compulsory for all extensions. The code and database really need to have the option of the above 2 examples.
1: If transferring to cloud storage delete all files in the archive but keep the database reference.
2: If wanting to delete a file before transfer delete both file and database entry.
Most extensions that I use this method and works fine.
The lines of code required for this is both simple and effective. Beats writing a full code that encompasses the transfer and retrieving of images.
There is also another main issue forgetting about amazon. When a file is deleted the database entry is removed but all the images remain in the image folder leaving the image folder with obsolete or no required images on a large site this creates major problems with backups and space. Also if a image with the same file name gets uploaded at a later time the upload files because the obsolete image exists in the image directory. In this case the correct code is required to remove the image from the image directory when a image is deleted.
In short in this day and age using a cloud storage platform is not only required but compulsory for all extensions. The code and database really need to have the option of the above 2 examples.
1: If transferring to cloud storage delete all files in the archive but keep the database reference.
2: If wanting to delete a file before transfer delete both file and database entry.
Most extensions that I use this method and works fine.
The lines of code required for this is both simple and effective. Beats writing a full code that encompasses the transfer and retrieving of images.