Make sure we trim documents sent to server if they are large