avoid copying the whole uploaded file in memory