I'm trying to incorporate this scanning software into an application.
The folder which contains all the necessary .js
, .css
and binary files is called Resources
.
In my MVC app - I have placed the Resources
file inside my Scripts
folder.
In my .cshtml
, I have the following:
@section scripts {
<script src="~/Scripts/Resources/dynamsoft.webtwain.config.js"></script>
<script src="~/Scripts/Resources/dynamsoft.webtwain.initiate.js"></script>
}
Which loads the scripts successfully.
The issue I'm facing is the scripts themselves reference relative paths within the Resources
folder.
In dynamsoft.webtwain.config.js
- you can set the path to the resources folder - I have mine set to the following:
Dynamsoft.WebTwainEnv.ResourcesPath = '~/Scripts/Resources';
However when the page loads - I'm receiving 404 errors for some of the files because it's trying to literally interpret the path:
I have also tried the following but with no luck:
Dynamsoft.WebTwainEnv.ResourcesPath = '@Url.Content("~/Scripts/Resources")';