store the file in a temp file, and save the filepath, instead of trying to store the file in the memory