Read a Valid Formated Html Local File Using Chrome with Tmp Extension

I've got a local file with a temporary extension (.tmp) which contains valid HTML code. I would like to allow chrome to read this file as a basic HTML file. When i load this file using chrome (e.g: file:///C:/file.tmp), chrome read it as a text file. I'm using currently list of chromium command: but cannot find which command (if exists?) could let me do what i wish.

This question is not relative to csharp but i'm using a net application to load the file, here is the code:

 var url = localFilePathUri; //e.g: file:///C:/file.tmp
 string args = "--kiosk --allow-file-access " + url;
 var test = System.Diagnostics.Process.Start("chrome.exe", args);

I could rename local file to use .html as extension but i would like to know if a more direct way exists?

Thank you!

2
Sarah Jenkins

Sarah Jenkins

Senior Technology Editor & AI Specialist

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.

Share this article