Move parameters in external file

JBatchUpload pure HTML version
Post Reply
User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Move parameters in external file

Post by support »

You can move JBatchUpload HTML5 parameters in an external file:

- Step1: Move ALL parameters in a new params.json file.
For example:

Code: Select all

  paramsData = {
     /* Regular parameters */
     url : "http://localhost:8080/upload/process.jsp",
     ...
     username : "test",
     password : atob("dGVzdA=="),
     ...
  }
- Step 2: Declare params.json as script:

Code: Select all

<script type="text/javascript" src="js/fileupload.min.js"></script>
<script type="text/javascript" src="params.json"></script>
- Step 3: Initialize params with paramsData in :

Code: Select all

  // Setup some parameters
  var params = paramsData;
  // Create your instance of JFileUpload.
...
externalParameters.png
Example
(52.6 KiB) Not downloaded yet

Post Reply