Photo upload: now with better errors and handling