Here are instructions to install and chain JFileUpload + JBatchUpload + JImageFilter :
1/ Download JFileUpload and Unzip it in a JFileUpload/ folder.
http://www.jfileupload.com/products/jfi ... l#download
2/ Download JBatchUpload and Unzip it in a JBatchUpload/ folder.
http://www.jfileupload.com/products/jba ... l#download
3/ Download JImageFilter and Unzip it in a JImageFilter folder.
http://www.jfileupload.com/products/jim ... l#download
4/ Copy all files and folders from JFileUpload/ into JBatchUpload/
5/ Copy the following files from JImageFilter/ into JBatchUpload/
lib/ifilter.jar into lib/ folder.
scaling.properties file.
6/ Edit applet_http_batchupload.js and append ,lib/ifilter.jar to all ARCHIVE parameters such as:
ARCHIVE="lib/jfileupload.jar,lib/httpimpl.jar,lib/chttpclient.jar,lib/clogging.jar,lib/batchui.jar,lib/ifilter.jar"
There are 3 ARCHIVE parameters (for cross-browsers support) so don't forget to update all three.
7/ Edit applet_http_batchupload.js and add the following parameters to enable JImageFilter:
...
document.write('filter="jfileupload.upload.client.filter.ImageFilter" ');
document.write('filterproperties="scaling.properties" ');
...
document.writeln('<PARAM NAME="filter" VALUE="jfileupload.upload.client.filter.ImageFilter">');
document.writeln('<PARAM NAME="filterproperties" VALUE="scaling.properties">');
...
Notice that step 6 and 7 are similar if you're using applet_ftp_batchupload.js. Only ARCHIVE
content will be different (because of FTP libraries instead of HTTP libraries).
8/ Remove the following files and folders that are not needed anymore:
- documentation/
- documentation-jbatchupload/
- applet_http.html
- applet_http.js
- applet_ftp.html
- applet_ftp.js
- readme.txt
- readme-jbatchupload.txt
Then your JBatchUpload/ folder should look like:
And your lib folder should look like:
9/ Optionally, update i18n_bar.properties to modify text for scaling:
progress.bar.upload.filter.starting=Loading {0}
progress.bar.upload.filter.started=Scaling to {0} ...
progress.bar.upload.filter.completed=Scaling completed
progress.bar.upload.filter.failed=Scaling failed {0}
10/ Optionally, update scaling.properties to setup best image quality for scaled image:
impl=awt