JFileUpload + JImageUpload + JImageFilter install

Image previewer add-on.
Post Reply
User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

JFileUpload + JImageUpload + JImageFilter install

Post by support »

Instructions to install JImageFilter with JImageUpload are available at:
http://www.jfileupload.com/products/jim ... faq.html#6

Here are more instructions and samples to install JFileUpload + JImageUpload + JImageFilter.
Notice that if you're using JFileUpload 2.1 and you need JImageFilter and JImageUpload 2.1
as well.

1 - Download JFileUpload
http://www.jfileupload.com/products/jfi ... l#download

2 - Uncompress the package into a folder (for instance c:/test)

3 - Download JImageUpload:
http://www.jfileupload.com/products/jim ... l#download

4 - Uncompress the package into the same folder.

5 - Download JImageFilter:
http://www.jfileupload.com/products/jim ... l#download

6 - Uncompress the package into the same folder.

Now you should have the following files and folders:
allthree.jpg
Three packages uncompressed
(34.48 KiB) Downloaded 289 times
7 - Assuming that you plan FTP usage of JFileUpload + JImageUpload + JImageFilter
then edit applet_ftp_ipreview.js and append ,lib/ifilter.jar in each three
ARCHIVE parameters. So, you will have:
ARCHIVE="lib/jfileupload.jar,lib/ftpimpl.jar,lib/cnet.jar,lib/clogging.jar, lib/previewui.jar,lib/ifilter.jar"

This step allows to declare binary of JImageFilter in JImageUpload.

8 - Now, edit applet_ftp_scaling_iotools.js and copy/paste the following lines in
applet_ftp_ipreview.js:
...
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">');
...
Pay attention where you copy/paste these lines, make sure they are added at the
correct place (see similar lines) in applet_ftp_ipreview.js
You can download the modified JavaScript files below:
allthreewithoutjars.zip
Configured JavaScripts
(7.86 KiB) Downloaded 977 times

9 - Setup "url" parameters with your FTP server. Setup and username and password.
Setup any other parameter that you need (WIDTH, HEIGHT, regfile, ...). Notice
that size of scaled images to upload is under scaling.properties. Thumbnail size
of preview displayed is under i18n_pane.properties.

10 - You can delete all files and folders that won't be used (see the ones selected in
the image below)
allthreecleanup.jpg
Clean up
(41.82 KiB) Downloaded 263 times
11 - You're ready to try JFileUpload + JImageUpload + JImageFilter
Open applet_ftp_ipreview.html into your browser:
screnshot.jpg
Screenshot
(26.76 KiB) Downloaded 270 times
I hope it helps.

Post Reply