More memory-efficient file uploading