How to change the location or to rename the ‘DCSResources’ folder with Dynamsoft Camera SDK

Scenario:
For customers who are using Dynamsoft Camera SDK, to change the location of the 'DCSResources' folder, or to rename it, please following the steps below:

Steps:

Say the original DCSResources folder is at '../{Project Directory}/DCSResources', and you want to change it to '../{Project Directory}/Newfolder/DCSResourcesTest'.

  1. Please make sure the structure inside 'DCSResources' folder stay unchanged.
  2. Change the relative path in your page where you reference to the js files, for example:
  3. <script src="DCSResources/dynamsoft.camera.config.js"></script>
    <script src="DCSResources/dynamsoft.camera.initiate.js"></script>
    // or your own operation js file
    <script src="Scripts/script.js"></script>
    

    Modify as below:

    <script src="Newfolder/DCSResourcesTest/dynamsoft.camera.config.js"></script>
    <script src="Newfolder/DCSResourcesTest/dynamsoft.camera.initiate.js"></script>
    // or your own operation js file
    <script src="Scripts/script.js"></script>
    
  4. Same change needs to be done in dynamsoft.webcam.config.js file. Change 'DCSResources' (to 'New folder/DCSResourcesTest' as in this case):
  5. dynamsoft.dcsEnv.resourcesPath = 'DCSResources';

    Modify as below:

    dynamsoft.dcsEnv.resourcesPath = 'Newfolder/DCSResourcesTest';

You are all set now. If you still have trouble with the resourcesPath, please contact us via support[at]dynamsoft.com