optimize upload and server