Fix ram consumption and big files uploads