Move parameters in external file

JBatchUpload pure HTML version

Move parameters in external file

Postby support » Mon Jan 02, 2017 1:10 pm

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
User avatar
support
 
Posts: 1492
Joined: Sun Jan 27, 2008 6:19 pm

Return to JBatchUpload - HTML5



cron

Sitemap | Privacy Statement | Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc.
in the U.S. and other countries. All other company and/or product names are the property of their respective owners.