For a while my wife has been into keeping our photos by scanning them into her PC and she will occassionally email a few off to people or print them for her scrapbooking. The challenge I have been seeing, is I store all of the images on my PC as well, on its own hard drive that has an automated backup procedure to ensure these memories are never lost or forgotten. So then the following question jumped in my head, “How can I make it so she can get to the photos stored on my PC without teaching her how to use Linux?”
No sooner than the question came, I had an answer. Write a photo album application that read the Photos on my hard drive and gave her a way to view them through our network. Now, before I started such an adventure, I wrote out a few things I wanted the application to do.
- Show all Folders and Images/Movies in the Folders in an easy to navigate form
- Create thumbnails of all of our photos for easy viewing automatically, and do not continously recreate the thumbnails, instead save them and pull them up so they are (in a sense) cached
- Allow anyone to Rename, Delete, Move, or Save the photos (I’ll explain these more later)
- Keep it protected so any unauthorized access is not permitted
Writing the initial system took me less than 4 hours and contained the functionality to Browse the Folders, see the Thumbnails, and save the Images to your PC locally by clicking on the image. This then evolved into add a toolbar beneath each photo allow the user to Save, Move, Erase, or Rename the image (Screenshot #2 shows this toolbar).
Finally, after all of the functionality was put into place, I needed to find a way to protect it from unauthorized access. Typically, I just use PHP to do this and write a login screen, but this time I decided to use htaccess since it is already a function of Apache. Any connection to my home computer from the network will bypass the htaccess file, however, any connection from an outside source will be asked for a username and password.
Finally, everything is complete, my wife loves it, and finds it easy to use, not to mention all she had to learn of Linux was how to load the images from our Digital Camera to the Picture Facility using the Compact Flash Drive. In the end, she can sit anywhere with her PC and get to the images she wants to work with from both inside the network and outside.
Screenshots: