socket io photo handler