Server-side code for 6.885 project PhotoFlow