I've created a dynamic file search URL that returns the file URL in the {row}
form. And I've been trying to add the functionality to open the same file URL in a new tab on click.
Here {row}
returns the full file path from the Device's directory which is, in my case,
/users/prerak/Desktop/OpenMFRefer/data/message1
I've tried -
<Link to={`${row}`} target="_blank">{row}</Link>
But this redirects me to localhost:3000/<file path>
. Instead, it should redirect me to file:///<file path>
I also tried -
<Link to={`/${row}`} target="_blank">{row}</Link>
which sends me to http://<file Path>
which is pretty much more of the same issue.
Please tell me how I can fix this.