Parameter name | Default value / Implemented in |
Description |
---|---|---|
uploadPolicy | DefaultUploadPolicy see {@link wjhk.jupload2.policies.UploadPolicyFactory} |
This parameter contains the class name for the UploadPolicy that should be used. If it is not set, or if its value is unknown from {@link wjhk.jupload2.policies.UploadPolicyFactory#getUploadPolicy(Applet, JTextArea, String)}, the {@link wjhk.jupload2.policies.DefaultUploadPolicy} is used. |
postURL | Mandatory {@link wjhk.jupload2.policies.DefaultUploadPolicy} |
It contains the target URL toward which the files should be upload. This parameter is mandatory for existing class. It may
become optional in new UploadPolicy, that would create this URL from other data.
If the this URL may change during the applet execution time, you can create a new UploadPolicy class,
and either :
|
debugLevel | 0 {@link wjhk.jupload2.policies.DefaultUploadPolicy} |
With 0, you get the normal production output. The higher the number is, the more information is displayed
in the status bar.
Note: the whole debug messages is stored in the {@link wjhk.jupload2.policies.DefaultUploadPolicy#debugBufferString}. It can be used to display more information, if needed. See also the 'webmasterMail' parameter. |
lang | Navigator language {@link wjhk.jupload2.policies.DefaultUploadPolicy} |
Should be something like en, fr... Currently only french and english are known
from the applet. If anyone want to add another language ... Please translate the
wjhk.jupload2.lang.lang_en, and send it back to |
urlToSendErrorTo | Empty String {@link wjhk.jupload2.policies.DefaultUploadPolicy} |
If this url is given, and an upload error occurs, the applet post the all the debug output to this address. It's up to this URL to handle this mail. It is possible to just store the file, or to log the error in a database, or to send a mail (like the mail.php script given with the coppermine pack). |
nbFilesPerRequest | -1 {@link wjhk.jupload2.policies.DefaultUploadPolicy} |
This allows the control of the maximal number of files that are uploaded in one HTTP upload to the server.
If set to -1, there is no maximum. This means that all files are uploaded in the same HTTP request. If set to 5, for instance, and there are 6 files to upload, there will be two HTTP upload request to the server : 5 files in the first one, and that last file in a second HTTP request. |
serverProtocol | HTTP/1.1 {@link wjhk.jupload2.policies.DefaultUploadPolicy} |
This parameter allows the control of the protocol toward the server. Currently, only HTTP is supported, so
valid values are HTTP/0.9 (not tested), HTTP/1.0 and HTTP/1.1.
This parameter is really useful only in {@link wjhk.jupload2.policies.CoppermineUploadPolicy}, as the coppermine application also controls that the requests send within an HTTP session uses the same HTTP protocol (as a protection to limit the 'steal' of session cookies). |
stringUploadSuccess | .* 200 OK$ {@link wjhk.jupload2.policies.DefaultUploadPolicy} |
This string is a regular expression. The upload thread will try to match this regular epression to each
lines returned from the server.
If the match is successfull, the upload is considered to be a success. If not, a
{@link wjhk.jupload2.exception.JUploadExceptionUploadFailed} is thrown.
The default test expression testes that the web server returns no HTTP error: 200 is the return code for a successfull HTTP request. It actually means that postURL is a valid URL, and that the applet was able to send a request to this URL: there should be no problem with the network configuration, like proxy, password proxy...). But it doesn't mean that the uploaded files have correctly be managed by the server. For instance, the URL can be http://sourceforge.net, which, of course, would not take your files into account. So, as soon as you know a regular expression that test the return from the target application (and not just a techical HTTP response code), change the stringUploadSuccess to this value. For instance, the {@link wjhk.jupload2.policies.CoppermineUploadPolicy} changes this value to "^SUCCESS$", as the HTTP body content of the server's answer contain just this exact line. This 'success' means that the pictures have correctly be added to the album, that vignettes have been generated (this I suppose), etc... |
maxPicHeight | -1 {@link wjhk.jupload2.policies.PictureUploadPolicy} |
This parameters allows the PHP script to control the maximum width for pictures. If a picture is to be
download, and its height is bigger, the picture will be resized. The proportion between width and height
of the resized picture are the same as those of the original picture. If both maxPicHeight and maxPicWidth
are given, it can happen that the resized picture has a height lesser than maxPicHeight, so that width
is no more than maxPicWidth.
Precisions: If this parameter value is negative, then no control is done on the picture height. If the original picture is smaller than the maximum size, the picture is not enlarged. If the picture is resized, its other characteristics are kept (number of colors, ColorModel...). The picture format is ketp, if targetPictureFormat is empty. If the picture format is a destructive (like jpeg), the maximum available quality is choosed. |
maxPicWidth | -1 {@link wjhk.jupload2.policies.PictureUploadPolicy} |
Same as maxPicHeight, but for the maximum width of the uploaded picture. |
targetPictureFormat | Empty String (to be implemented in {@link wjhk.jupload2.policies.PictureUploadPolicy}) |
This parameter can contain any picture writer known by the JVM. For instance: jpeg, png, gif. All standard formats should be available. More information can be found on the java.sun.com web site. |
albumId | -1 {@link wjhk.jupload2.policies.CoppermineUploadPolicy} |
This parameter is only used by CoppermineUploadPolicy. So it is to be used to upload into a
coppermine picture gallery. This parameter
contains the identifier of the album, where pictures should be used. See CoppermineUploadPolicy
for an example.
Before upload, CoppermineUploadPolicy.{@link wjhk.jupload2.policies.CoppermineUploadPolicy#isUploadReady()} checks that the albumId is correct, that is: >=1. |
storeBufferedImage | false {@link wjhk.jupload2.policies.PictureUploadPolicy} |
This parameter indicates that the preview image on the applet is kept in memory. It works really nice under eclise. But, once in the navigator, the applet runs very quickly out of memory. So I add a lot of calls to {@link wjhk.jupload2.filedata.PictureFileData#freeMemory(String)}, but it doesn't change anything. Be careful to this parameter, and let it to the default value, unless you've well tested it under all your target client configurations. |