upload photo with curl works correctly