Fix msg char array size
Add "upload" function on client side