Welcome Login
Blog Photos Links

RSS Feed

April 13, 2012, 11:51 pm - James Farrer

So today I discovered that Dropbox has a Linux client. And that Linux client can be run from the command line. This is important since my servers don't have GUI's installed. This is very important since I've been struggling with easy file upload to my website for quite some time. This is important since I have well over 10,000 photos on my site and the number is steadily growing.

For the most part I've been the primary contributor. And for all practical purposes, the only contributor. I have a custom built site that I use for a number of things, one of which is to learn how to do stuff. As part of this I have built in the ability to do bulk photo uploads via a mapped network drive. This is great if you're on my home network where you can map the drive. If not, well, it starts to get messy real quick. You can upload photos one at a time, but that's just painful unless you only have one. And this is rarely the case for me or other family members that want to contribute.

So here's the nitty gritty of the idea I had. I can set up a shared folder in Dropbox with those people who want to do bulk photo uploads to my site. I put the Dropbox client on the server, which other than having to find a custom init script to keep the daemon running, was pretty simple. Viola! now my Dropbox files are on the server, including this shared folder for uploads.

The next step was to update my bulk photo import functionality in my website to look at the dropbox folder. I went the extra step to make it look at both the old folder and the new one to keep the existing functionality intact and then I had it. I was able to use pretty much the same code I already had and it's working pretty slick. The biggest snag was that I had to set a few folder permissions to make sure the server could get to what I wanted. Otherwise pretty simple

One of the next steps, now that Dropbox also has automatic photo upload from my phone, will be to set up a scheduled job that will monitor the Camera Uploads folder and automatically import them. Then I'll have roughly my own version of what Google+ does, which is super convenient. That will be a future step since I currently don't have the option for having private photos on my site and I don't want the pictures to be automatically public. Now that I have the hard part solved with Dropbox, that's just a matter of time before I can do all sorts of things like that.

 

If you haven't signed up for Dropbox yet and want to, you can by clicking on this link: http://db.tt/681mdFko. By doing so you'll give me some extra space for free and we both win.


What's New

There are currently no new items, please check back later.

Archives
2021 (2)
  September (1)
  May (1)
2019 (1)
  August (1)
2018 (3)
  August (1)
  April (1)
  January (1)
2017 (1)
  January (1)
2016 (4)
  December (1)
  November (1)
  May (1)
  January (1)
2015 (1)
  December (1)
2014 (2)
  August (1)
  February (1)
2013 (4)
  October (1)
  July (1)
  June (1)
  April (1)
2012 (11)
  December (2)
  October (3)
  September (1)
  May (1)
  April (1)
  February (2)
  January (1)
2011 (14)
  December (1)
  November (1)
  September (2)
  July (2)
  June (1)
  May (1)
  April (2)
  March (3)
  January (1)
2009 (2)
  October (1)
  June (1)
2008 (1)
  September (1)