Re-implemented photo uploading.