Production process and application of medium carbon chain fatty acid esters