Uploading file using websockets (complete)