Fixed Upload

Upload is now working properly, as tested using netcat.