Home

JUpload Manual

image

Contents

1. 23 FEB xk rr we e en e 0 24 Buttons and some info gt ser o OER RR RE E RS 5 24 Buttons status and progress bar while process is running 25 File chooser with image preview 25 Uploading and showing about window 27 Accessing structure for DOM elements 30 Loading process with progressbar and boxmessage 33 Input dialog for the askAuthentification parameter 34 Successi upload 7 2 5 Sa Sue ss rennen 34 The labels for files and sizes s 2 228 048 eR 5999x635 35 Window with a html response o o 38 Error message in the realtime response window 38 You can easily customize the applet with skins 40 41 42 LIST OF FIGURES Bibliography 1 E Nebel L Masinter 1995 Form based File Upload in HTML http www faqs org rfcs rfc1867 html E Levinson 1998 The MIME Multipart Related Content type ftp ftp rfc editor org in notes rfc2387 txt R Fielding J Gettys J Mogul et al 1999 Hypertext Transfer Protocol HTTP 1 1 ftp ftp rfc editor org in notes rfc2616 txt Keld Simonsen et al 1990 1996 Code for the representation of names of languages http ftp ics uci edu pub ietf http related iso639 txt Maintenance Agency for ISO 3166 country codes 1999 ISO 3166 Codes Countries http www iso org iso en prods services iso3166ma index html
2. 400 function myAddListener alert A file was added function myRemoveListener alert A file was remove function myUploadListener alert Upload will be started function myUploaded alert Upload is finished function displayFileQueue if there is no JUpload go back if document JUpload return if document JUpload jsIsReady return 2 4 JUPLOAD PLUGINS open a new empty document Fl window open about blank queueWindow width 300 height 400 Fl document writeln lt html gt lt body gt lt hl gt file list lt hl gt there are var number document JUpload jsGetFileNumber Fl document writeln number Fl document writeln files lt ul gt write a file list for i 0 i lt number i Fl document writeln lt 1i1 gt document JUpload jsGetFileAt i Fl document writeln br font color green gt Size document JUpload jsGetFileSizeAt i lt font gt Fl document writeln lt ul gt lt body gt lt html gt gt lt SCRIPT gt lt HEAD gt lt BODY onLoad myOnLoad gt lt form name JUploadForm gt lt input type button value Add files onClick document JUpload jsClickAdd gt lt input type button value Remove files onClick ocument JUpload jsClickRemove gt lt input type button value Start Upload onClick document JUpload jsC
3. KB ZARGO Da 19 11 2003 My Music 0B Dateiordner 24 10 2003 Sonnenfins 24 KB JPEG Bild 04 09 2002 testbd 97 KB TxT Datei 01 12 2003 The Slip 0B Dateiordner 06 02 2004 Windows 2 126 KB JPEG Bild 04 09 2002 il I Figure 2 6 Simple file chooser plugin in Detailed view current directory With the help of the filetype plugin the folder chooser plugin and some JavaScript functions you can create your own customized Add files dialog And best is it will be integrated into your html page and style no annoying popup dialog window Here are the JavaScript functions available to remote control the plugin jsMoveUPO This will jump from the current folder to its parent folder jsGotoHome This will jump to the users home directory jsGotoDefault This will jump to the users default directory for selecting files jsViewList This will switch the viewing mode to the default list mode This will only display the filenames and the icons for that filetype as requested by the operating system jsViewDetailed This will switch to a detailed viewing mode displaying a table with more information about the files It will display the filename it s size a descrip tion about the file type and the last modified timestamp jsViewThumbnail This will switch to a view with thumbnails of images Here is the code to integrate the simple file chooser plugin into the html document applet code JUploadPlugin_SimpleFileChooser
4. Philippe Le H garet et al 2002 Document Object Model DOM http www w3 org DOM Dave Raggett et al 1999 HTML 4 01 Specification http www w3 org TR htm1401 struct objects html edef OBJECT 43
5. SER UDC 30303271 421 46 25000925000940 avi 30303271 43123 25001138001149 avi 3a tut1 1 ppj Sa tutl 2 ppj 3a tut1 title1 prtl i3a tut1 IK Figure 3 4 File queue 3 1 5 Uploading If you re ready with selecting and adding files to the file queue you can start the upload process Click on the Upload button to start Note that the upload can t be stopped or paused Dateien hinzuf gen Dateien entfernen Hochladen Dateien 13 Bytes 3 04 MB Figure 3 5 Buttons and some info A cancelled upload process cannot be resumed at the same position if you re work ing with standard POST method Are JUpload and the server configured for using PUT method upload resuming is possible This will save you time and nerves Using PUT you can resume the upload Simply add the same files again and hit the Upload button JUpload will automatically determine which files have already been uploaded and which have to be resumed Please keep in mind that this feature must be supported by the server and the server side scripts If you have any questions about this please ask your system administrator 3 1 6 Status display While uploading you will see a status display on the right side of the applet just under there the buttons have been It will display some status messages like Looking up server name or Connecting etc There is also a progress bar which will display the amount of time elapsed and remaining fo
6. A specialty of JUpload is it s Resume feature but this has to be supported on server side too You don t need to re implement your web application All you have to do is to replace the part which accepts the uploaded files This manual gives you the information for installation and configuration for ad ministrators and web application developers usage user manual Developers get all the required information in the Developers section CHAPTER 1 INTRODUCTION Chapter 2 Administration The administrational section is about installation and configuration of the applet on the server side For usage of the applet see the user manual section 2 1 Installation In these subsections you will find the system requirements for the applet and the pro cedure to install and to configure the applet 2 1 1 System requirements On server side There are no special server side requirements except The server must be able to deliver binary data so the applet can be downloaded by the users Important to know is that some of the webservers can t handle multipart requests properly This is the case with older ASP and PHP versions Please use current versions of the server extensions On client side On the client side we need at least Java 1 4 This version includes the Java Plug In which is used to run applets in the browser The applet may run on Java 1 3 but this is not officially supported It is not possible to use Microsoft Virtu
7. archive jupload jar width 300 height 300 mayscript name JUploadPlugin_SimpleFileChooser alt JUpload Plugin Simple file chooser gt lt applet gt 18 CHAPTER 2 ADMINISTRATION 2 4 4 Image preview plugin The JUploadPlugin ImagePreview shows a thumbnail of the currently selected file The file can be selected in JUpload s file queue list or in the view of simple file chooser plugin Integration code applet code 2 JUploadPlugin ImagePreview archive jupload jar width 300 height 300 mayscript name JUploadPlugin_ImagePreview alt JUpload Plugin Image preview gt lt applet gt 2 4 5 Progress meter plugin The JUploadPlugin ProgressMeter shows the same progress bar as JUpload would do in its status panel With the plugin you can customize its position and size on the html page applet code 2 JUploadPlugin ProgressMeter archive jupload jar width 900 height 50 mayscript name JUploadPlugin_ProgressMeter alt JUpload Plugin Progress meter gt lt applet gt 2 4 6 Remote control A sample of how to use the remote control features of JUpload and its plugins lt input type button value Parent folder onClick document JUploadPlugin_SimpleFileChooser jsMoveUp gt lt input type button value Home folder onClick document JUploadPlugin_SimpleFileChooser jsGotoHome gt lt input type button value Remove first file onclick document JU
8. y3a tutl title prtl Hochladen q3a tut1 Dateien 17 PE1994 X 2666 jpg J Bytes 483 12 KB PE1994 X 2562 jpg PE1994 X 2686 jpg Sende Datei 817 PE1994 X jpg 32 39 kb s 8s j 4kbis 6s ars PE1994 X 4516 jpg X q3a tut1 2 ppj amp amp JUpload Hilfeseite applet code JUpload startup class archive JUpload jar width 450 height 200 alt JUpload java applet for uploading multiple files at once f lt Java Plug In Options gt f lt param name progressbar value true gt lt param name boxmessage value Loading JUpload Applet gt lt param name boxbgcolor value fe0e0 gt PARAM NAME backgroundColor VALUE e0e0e0 gt lt Type is Strir PARAM NAME completeURL VALUE gt lt Type is URL gt PARAM NAME actionURL VALUE http 192 168 0 3 jupload demo J PARAM NAME ask uthentification VALUE false gt lt Type is Boc PARAM NAME tagName VALUE uploadedFiles gt lt Type is String PARAM NAME checkResponse VALUE true gt lt Type is Boolean PARAM NAME showSuccessDialog VALUE true gt lt Type is Boolee PARAM NAME imageFileFilter VALUE false gt lt Type is Boolear PARAM NAME hideShowAll VALUE false gt lt Type is Boolean gt PARAM z showPicturePreview VALUE true gt lt Type is Boole PARAM NAME addWindowTitle VALUE Dateien hinzuf gen gt lt Tyr PARAM NAME imageURL VALUE gt l
9. DEVELOPERS MANUAL To transfer user inputs HTML forms are used These can include text inputs password fields check boxes radio boxes and other inputs and selection JUpload is able to read the values of these elements via the LiveConnect package HTML Dokument startup Applet context Figure 4 1 Accessing structure for DOM elements Fiir Entwickler sieht der Zugriff auf JavaScript Objekte wie folgt aus This is an example how JUpload uses the LiveConnect package to access the DOM model inter nally Get the browser window the document and the html form JSObject win parent applet jsBrowserWindow JSObject doc JSObject win getMember document JSObject form JSObject doc getMember JUploadForm JSObject elements JSObject form getMember elements Get the amount of fields Double dnum new Double elements getMember length toString int num dnum int Value Read the fields for int i 0 i lt num i Object thisSlot elements getSlot i String fieldName String jsThisSlot getMember name String fieldValue String jsThisSlot getMember value Chapter 5 Appendix 5 1 Configuration This is an example how to integrate JUpload into a website lt applet code JUpload startup class archive JUpload jar width 500 height 300 mayscript name JUploadApplet alt JUpload applet gt lt include the PARAM tags here gt lt applet gt code
10. Inhalt nur installierenfanzeigen wenn Sie Vertrauen haben Mike Haller diese Versicherung zu geben Mehr Details Nein Immer Figure 3 1 Certificate details 21 22 CHAPTER 3 USER MANUAL 3 1 2 Overview If the JUpload applications is loaded and the certificate has been acceptes the main window will appear In the upper left corner you will see the file queue In the lower left corner you will see the realtime response window It will display the server response in realtime eg while it s still reading the same This feature can be switched on and off via parameters On the right side you will see the control area There are three buttons Add Remove and Upload which are self explanatory Add will open a dialog where the user can select files and add them to the file queue Remove will remove the selected files from the file queue Upload will start the upload process send all files to the server and remove them from the file queue 65 SUnloz 7 Figure 3 2 JUpload main view 3 1 3 Selecting files To prepare files for the upload you have to select them Selected files will appear in the upper left corner of JUpload the file queue File names will be displayed in short 1f you need to know the full pathname use the tooltip move your mouse above the file and wait until the tooltip appears To add new files to the file queue click on the button labeled Add This will displ
11. The startup class of JUpload archive The name of the archive where JUpload is stored jupload jar width Sets the width in pixel for the applet You should not use 0x0 pixel but instead use 1x1 and a invisible div if you need to hide the applet height Sets the height in pixel for the applet Width and height cannot be changed after the applet while it s running alt Sets an alternative description for the applet e g for blind users mayscript This is a keyword to enable JUpload to access JavaScript and enable the remote control features of JUpload via JavaScript In newer HTML you should user mayscript mayscript name Sets the name of the JUPload applet in the DOM tree so you can access it via JavaScript like document lt name gt You should not use the applet tag but the OBJECT and EMBED tags These two are newer and have much more features Mozilla org shows how to use the OBJECT tag for Mozilla browsers 31 32 CHAPTER 5 APPENDIX lt OBJECT classid java appletname class type application java codebase archive width height gt lt PARAM name value gt lt OBJECT gt For a detailed description of the Object Tag see the W3C page http www w3 org TR html401 struct objects html edef OBJECT This is the common Applet Tag lt APPLET code XYZApp class codebase html align baseline width 200 height 200 gt lt PARAM NAME model VALUE models HyaluronicAcid x
12. in the lower left corner This displays the server side output of the script as simple html It can display server results in realtime that means while they are printed out ifthe server does not use any output buffering In PHP you can use it with the flush function lt param name realTimeResponse value false gt mainSplitpaneLocation Sets the position of the main slider from left border in pixel 5 1 CONFIGURATION 39 lt param name mainSplitpaneLocation value 450 gt leftSplitpaneLocation Sets the position of the left slider from top border in pixel lt param name leftSplitpaneLocation value 250 gt hideAddButton Hides the add button lt param name hideAddButton value true gt hideRemoveButton Hides the remove button hideUploadButton Hides the upload button showStatusPanel Switch on or off the right status information panel lt param name showStatusPanel value false gt skinThemePackURL Set an address to a compressed theme pack for the SkinLF fea ture Note that you need to include the skinlf jar package in the codebase for this feature to work lt applet archive skinl f jar jupload jar alt JUpload Applet gt lt param name skinThemePackURL value aquathemepack zip gt lt applet gt useProxy Force the use of the proxy servers as set in the Java Plugin or the browser itself lt param name useProxy value false gt showThumbnails Enable or disable the thumbnails in the file
13. queue lt param name showThumbnails value false gt targetFrame Sets the target frame for the completeURL feature The new page will be directed to the html frame with the specified target name param name targetFrame value MyLeftFrame 40 CHAPTER 5 APPENDIX Dateien hinzuf gen Hochladen Dateien 1 5 62 KB Dateien hinzuf gen Look In Eigene Dateien E a pizza dienste bt a Untitl laa ports a wake quake seu a webs ShowLetter html a systemprotokoll 2003 04 11 evt a testisq test paf png a test psp mmc la tiscalibd _automodelle cpp a TODO sxw la trigger doc eference pdf la trigger02 pls trigger03 pls la triggerd4 pls A File Name est Kopie jpg Files of Type Alle Dateien Dateien hinzuf gen Abbrechen Figure 5 7 You can easily customize the applet with skins List of Figures FAI 2 2 2 3 2 4 23 2 6 4 1 5 1 2 5 3 5 4 2 3 5 6 RN A standard file input tag for upload 8 Java Console Log Window 12 Faletype chooser gt sre Rom UE Ro A oe R 15 Folder chooser plugi lt lt 000 t eae eane e ge s 16 Simple file chooser plugin in List view 16 Simple file chooser plugin in Detailed view 17 CENAS details ou oos sou SAA o PERSE aL 21 JUpload quam MEW o s e luae e A SER RR m 22 File chooser with customized Look And Feel
14. Benutzerhandbuch So Today people are not any more rooted but networked Anna Heine Contents 1 Introduction 5 2 Administration 7 ZA TOSTADO yc ga Eorum ROS C Re E sd 7 2 1 1 System regumemenis uos aR SE ee 7 2 12 gt od A AAA ee 7 2 2 ConHpuratlo oos odo SAE Re 7 2 2 1 General notes about parameters 9 2 2 2 Advanced configuration 10 223 ck gs mern AD EUR Rc 12 23 Programming interface 12 22 ces eS eb xx REY SE GS 12 2 62 MCDS REGE Aes eee SHAS OR 13 23 Callback fucum 2 6 ander Y ER e 14 Poe BAM i bh bee ek EAS Sd ess 14 24 JUNO PRISAS eoe de se ee a Meines 15 241 Filetype chooser 2 2 5 0 654606 bee ee ee wa eee 15 242 Pokerchoosef 2 464045 oL 9 R39 x 16 2 4 3 Simple file chooser plugin 16 244 Image preview plugin lt lt wee be e 18 2355 Progress meter lt c so pocece 18 250 Remote coniral osos arena 18 3 User manual 21 Sok TAGGIN on a a oe RG ee RA RS 21 Soll Uy 2b eee Meeks bb a BS oe 21 SALA ANOTE Sou ky tiers ER Bee Bette amp d 22 A aia ji hoe wh eee Pe 22 Slot REMITE tiles coe a Sete Bed He s 23 Sle 2 4054 2554 een ern 24 316 State display 6 2 44 5424445444 be
15. File Name Files of Type Alle Dateien v Figure 3 3 File chooser with customized Look And Feel Drag n Drop Dateien hinzuf gen Abbrechen You can use Drag n Drop to drag files from your filesystem explorer directly into the file queue of JUpload Click on the file you want to upload in the explorer and don t release the mouse button Now move your mouse over to the running JUpload applet Move your mouse cursor into the file queue and then release the mouse button Dragging files out from JUpload is not supported File queue The file queue display all the files which will be uploaded when the upload process starts It will display the filename and optionally a small thumbnail of image files If you rest your mouse cursor over a filename for a few seconds you will see a tooltip containing the full path information of that file 3 1 4 Remove files If there are items in the file queue you do not want to upload you can remove them from the file queue Select them using the mouse single click for single files hold shift or control to select multiple files and click the Remove button The selected items will be removed from the file queue and no longer be uploaded If the upload process has already started it s not possible to remove any files If you remove files from the file queue no files will be erased from the hard disk 24 CHAPTER 3 USER MANUAL ix jpg SER ENV SER
16. al Machine The reason is that MS JVM is based on Java 1 1 and does not support some of the required features The client also requires a browser which can handle signed applet The applet runs fine on Internet Explorer Mozilla and Opera It does not run in Konqueror 2 1 2 Installation Uncompress the downloaded archive jupload zip into a directory beneath the document root of your webserver The most important file is JUpload jar which contains the signed application 2 2 Configuration The applet s can be configured to fit the requirements of your web application The easiest way is to use the sample handler JUpload php which is included in the archive 7 8 CHAPTER 2 ADMINISTRATION Please make sure that PHP is properly installed and configured before using any of the provided samples Also make sure that normal file upload is working To test this you can create a html file with the following conten Example lt html gt lt form method POST action JUpload php enctype application form data input type file lt input type submit gt lt form gt lt html gt Result on the HTML page Browse _Submit Query Figure 2 1 A standard file input tag for upload Start your browser and open the URL of the HTML file Do not open the file using your filesystem To make sure you re running it from a webserver you can use another machine Select a readable file from your local hard disk and cli
17. ameter is not specified explicitly the applet will use its default values The default values are compiled in into the source code and can vary from version to version There are differernt types of parameters URL An URL specifies a web address This can be relative or absolute to the code base Examples 10 CHAPTER 2 ADMINISTRATION http localhost jupload php jupload php myapplication upload asp http other server 88 apps upload php Boolean This is a parameter of the type Boolean These are on off values It can be specified using the following values true false on off 1 0 yes no String This is a parameter containing multiple characters a string It s used for mes sages or labels Integer This is a parameter for configuring some numbers If used for file sizes or limits the unit is always bytes Often you can switch off the limit by using a value of 1 2 2 2 Advanced configuration The advanced configuration is for customizing the applet for your needs Internationalization JUpload is capable of 118 With the help of properties files you can easily spec ify your own translation If you want to creat your own translation uncompress the archive go to the subfolder JUpload The filenames of the language packs look like this jupload_xx_YY properties Language xx und Country YY are standardized see Language codes http ftp ics uci edu pub ietf http related iso639 EXE Country codes http
18. ay Java file chooser dialog where you can select files and folders Accept the dialog to add all selected marked files to the file queue More information about the standard file chooser dialog can be read in the Java user manual or in the manual of your operating system While selecting files JUpload provides a nice gadget image previewing This will create a preview of the selected image file It can be switched off using parameters Use the mouse wheel to zoom in and out of the preview this is only functional with Java 1 4 or higher Select one or multiple files with a single left click on your mouse optionally press ing control key or shift key If you want to select all files press control and A If you do not want to select any files and want to close the dialog select Abort see Administrators manual showRealTimeResponse 3 1 HANDLING S Dateien hinzuf gen Look In Eigene Dateien C Browser bzflag cache CAD Direct Connect Downloads Je Eigene Bilder C Fax I GTA Vice City User Files Holger Volk luciefer C Michael Wenning My Archives C My Pictures My Videos E Praetorians reskit win2000 Security C Ulead VideoStudio Visual Studio Projects fa 2003 pat a adventure sxc sa anvwendungsprotokoll 2003 04 11 e la arcor1 bmp la Audiol nra la brennLog txt a bzflag bzc la cdi nti sa claudia emailtxt Is easel
19. base html model models HyaluronicAcid xyz pluginspage http java sun com products plugin 1 3 plugin install html gt lt NOEMBED gt lt XMP gt gt lt SCRIPT gt APPLET code XYZApp class codebase html align baseline width 200 height 200 gt lt XMP gt lt PARAM NAME java code VALUE XYZApp class gt PARAM NAME java codebase VALUE html lt PARAM NAME java type VALUE application x java applet version l 3 lt PARAM NAME model VALUE models HyaluronicAcid xyz gt lt PARAM NAME scriptable VALUE true gt No Java 2 SDK Standard Edition v 1 3 support for APPLET lt APPLET gt lt NOEMBED gt lt EMBED gt lt OBJECT gt lt APPLET code XYZApp class codebase html align baseline width 200 height 200 gt lt PARAM NAME model VALUE models HyaluronicAcid xyz gt No Java 2 SDK Standard Edition v 1 3 support for APPLET lt APPLET gt 5 1 1 Plug In Settings Here you can find param settings for the behaviour of the Java Plugin progressBar Enables the progress bar while loading the jar file from the webserver lt param name progressbar value true gt 5 1 CONFIGURATION 33 Loading JUpload St Figure 5 1 Loading process with progressbar and boxmessage boxmessage Sets the displayed message while loading the jar file lt param name boxmessage value Loading JUpload Applet gt boxbgcolor Set a background c
20. ck on submit Is the file being uploaded and if you can find it on the server s target location specified in JU pload php the upload works and you can go on with the configuration of JUpload The most important parameter is actionURL This settings tells where to send the files For the understanding this should be same URL as in the action attribute of the form Example applet gt lt param name actionURL value http localhost JUpload php gt lt applet gt Most webbrowsers are case sensitive So make sure you entered the correct URL The complete applet tag can be retrieved from sample files In productive environ ments you should not use applet but instead a combination of OBJECT and EMBED tags With the help of these two tags it s possible to auto update the users java version The following APPLET tag is an example you can use to test your installation 2 2 CONFIGURATION lt applet code JUpload startup class archive JUpload jar width 650 height 400 gt lt param name actionURL value JUpload php gt lt applet gt applet The applet tag tells the browser that a java applet is following The attributes have all required information for the java plugin to find and to run the specified applet from the given archive code The code tag specifies the name of the main class This main class startup resides in a package or namespace called JUpload archive The applet consists of multipl
21. e class files and for clarity these are archived into a single file You have to specify the name of this archive to find the main classes Also the archive contains the signature which is required With the help of the signature the applet gains access to the users local filesystem If there is no signature the users won t be questioned and the applet automatically looses the possibility to work properly width This is the width in pixel of the space reserved for the applet height Same as width but for the height param The param tag is used for configurate the applet All param tags can be read within the applet It s like the command line arguments just for applets You ve got a name attribute and a value attribute All the supported parameters are described later in this document Names and values should be quoted Note that the names and values are case sensitive Parameter names must not have any spaces It is not possible to use the same parameter name twice or more times actionURL This is the address of the server side application which will accept the uploaded files Addresses can be specified relative or absolute to the codebase of the applet The codebase of the applet is the current html document which is displayed in the browser and which holds the applet tag 2 2 1 General notes about parameters A list of all supported parameters can be found later in this document All parameters have default values When a par
22. ee a ee 24 327 Meee preview near 25 318 JRecurgv seleclol oo RR ea ee 25 3 59 Wilenlier 22222 comm Rok oem m e m c m k 26 3 10 Emor messages o oss eL ko ec x ee y eo Re 26 2 Mo 2023 sce 04 ar Eae e bee eas Sa dS n 26 22 1 Oaie Mie 22 00 8 80206 ca REA TER s 26 4 Developers manual 29 41 Programming interface 2 eese cesio ee RR RR 29 4 1 1 API JavaDoc 29 A 2d s ke a beh Bee hOGA wae Ee ESS 29 ADT Prot o cols 222522 oo o Rok REOR ea t ed 29 ar o 2 opo OE HU A ee eee Ren 29 5 Appendix 31 Ad Commer 2 52 5 4 2c 09 bob 4 be Si do REG ee ee 31 5 1 1 Plug In Settings 2299 32 gk Rob ey 32 312 JUpload Parameters ee RR RR RR 33 AbbildimosverzeicbmS A 41 Quellenverzeichnis o s c eo cook mcm RR aa denke 42 Chapter 1 Introduction JUpload is a tool a java applet for the upload of local files from the client to the webserver using the standard protocol HTTP The application replaces a function which is not integrated into todays browsers very comfortable It expands the functionality of the supported browsers In its main function this is to select multiple resources and to upload them in one step to the server Secondly the usability if increased That is achieved especially through such neat features like image previewing or progress meters Such features are not part of the standard browsers Furthermore JUpload is designed to support secure transfer of the files using SSL
23. g functions can be used jsRegisterAddListener Functionname This function registers the given function name as a function for the Add event Each time a file is added for each of the added files this function is called jsRegisterAddedListener Functionname The given function will be called when all files has been added If the user selectes 5 files and adds them in parallel this hook will be called once at the end jsRegisterRemoveListener Functionname Each time a file is removed this hook is called jsRegisterUploadListener Functionname This hook will be called right before the upload process starts Attention JavaScript functions will interrupt the applet as long until they return with return or finish jsRegisterUploaded Functionname This hook will be called right after the upload is done 2 3 4 Example lt html gt lt head gt lt title gt JUpload JavaScript API Example lt title gt lt SCRIPT language JavaScript gt lt J function myOnLoad if document JUpload return check if jupload is up and running if document JUpload jsIsReady Register the listeners document JUpload jsRegisterAddListener myAddListener document JUpload jsRegisterRemoveListener myRemoveListener document JUpload jsRegisterUploadListener my oadListener document JUpload jsRegisterUploaded myUploaded else wait and try again until JUpload is ready window setTimeout myOnLoad
24. ing files event See next section for details jsRegisterUploadListener String Hooks the given javascript function to the Upload Before the upload starts event See next section for details jsRegisterUploaded String Hooks the given javascript function to the Uploaded Af ter the upload is finished event See next section for details jsGetFileNumber Returns the number of files in the upload file queue jsGetFileAt Index Returns the full qualidifed filename with path information of the file in the file queue at position Index jsGetFileSizeAt Index Returns the file size at the given position in bytes jsClickAdd Opens the Add Files dialog simulates a click on the Add button jsClickRemove Simulates a click on the Remove button removes all selected files from the file upload queue If no files are selected a message is shown jsClickUpload Simulates a click on the Upload button e g starts the upload pro cess jsGetTotalProgressbarValue Returns the current value of the total progress bar in percent jsRemoveFileAt Index Removes the file from the queue at the specified position 14 CHAPTER 2 ADMINISTRATION 2 3 3 Callback functions To use the callback functions JUpload needs to know their names and the applet must be given the permission to access JavaScript To give it the permission the keyword mayscript is used To tell JUpload the names of the user defined hooks also called listeners the followin
25. itsplatz WIN2000 C 2 DATEN E Figure 2 4 Folder chooser plugin The plugin JUploadPlugin FolderChooser lets you choose the folder for adding files from Like the file type chooser plugin it depends only on the SimpleFileChooser plugin and not on the standard Add files dialog of JUpload applet code 2 JUploadPlugin FolderChooser archive jupload jar width 300 height 24 mayscript name JUploadPlugin FolderChooser alt JUpload Plugin Folder chooser gt lt applet gt 2 4 5 Simple file chooser plugin I xvpics 1280x1024 gif 1600x1280 gif f 639x479 gif 640x480 gif f 800x600 gif f 900 1000 gif 55 Chateau jpg Eigene Bilder laa mailserver zargo My Music Sonnenfinsternis jpg a test txt The Slip Windows 2000 jpg Figure 2 5 Simple file chooser plugin in List view This plugin JUploadPlugin_SimpleFileChooser will give you a view of your local file system like the one in the Add files dialog It will display all the files of your 2 4 JUPLOAD PLUGINS 17 Filename Size Description Last changed AXvpics 0B Dateiordner 05 11 2003 1280x1024 1 KB GIF Bild 05 11 2003 1600x1280 2 KB GIF Bild 05 11 2003 639x479 gif 3 KB GIF Bild 05 11 2003 640x480 gif 3 KB GIF Bild 05 11 2003 800x600 gif 4 KB GIF Bild 05 11 2003 900x1000 gif 5 KB GIF Bild 05 11 2003 Chateau jpg 68 KB JPEG Bild 04 09 2002 Eigene Bild 0 B Dateiordner 09 10 2003 mailserver
26. lickUpload gt lt input type button value Display File Queue onClickz displayFileQueue lt form gt lt applet code JUpload startup class JUpload jar Upload mayscript widthz 650 heightz 400 alt JUpload uploads files to webserver gt lt PARAM NAME actionURL VALUE JUpload php gt lapplet lt body gt lt html gt 2 4 JUpload Plugins This section will give an introduction to the integrated JUpload plugins They are used as standalone java applets on the same html page It is not possible to use them in different frames With the help of the JUpload Plugins you can customize the look and feel and the behaviour of the applet 2 4 1 Filetype chooser Alle Dateien gt Alle Dateien Bild Dateien jpg gif png PEG Dateien jpg jpeg ideo Dateien mpg avi Figure 2 3 Filetype chooser plugin The plugin with the name JUploadPlugin FiletypeChooser let s you integrate a file type or file filter chooser on the page Selecting a different file type filter in this plugin will set it in the file selection window of the other plugin JUploadPlu gin SimpleFileChooser Usage applet code JUploadPlugin_FiletypeChooser archive jupload jar width 300 height 24 15 16 CHAPTER 2 ADMINISTRATION mayscript name JUploadPlugin FiletypeChooser alt JUpload Plugin Filetype chooser gt lt applet gt 2 4 0 Folder chooser KO Arbe
27. nables the picture preview in the Add files dialog lt param name showPicturePreview value false gt addWindowTitle Set a customized title for the Add files dialog lt param name addWindowTitle value Dateien ausw hlen imageURL Specifiy an URI with an Image which will be display in the applet Can be used for branding the applet with your logo lt param name imageURL value images applet logo gif gt labelFiles Set the text for the amount of files label lt param name labelFiles value Dateien gt Hochladen Dateien 1 Bytes 5 62 KB Warte auf Antwort Cel Ww a aT T AP a Figure 5 4 The labels for files and sizes labelBytes Sets the text for the size of the upload lt param name labelbytes value Gr e gt labelAdd Set the text for the add button lt param name labelAdd value Hinzuf gen gt labelRemove Set the text for the remove button lt param name labelRemove value Entfernen gt labelUpload Set the text for the upload button lt param name labelUpload value Hochladen gt successDialogMessage Set the text for the successful upload dialog lt param name successDialogMessage value Hochladen war erfolgreich gt successDialogTitle Set the title for the successful upload dialog lt param name successDialogTitle value Alles Okay gt addToolTip Set the tooltip text for the add button 36 CHAPTER 5 APPENDIX lt param name addToolTip value Klicken um Dateien hinzuz
28. olor for the applet frame lt param name boxbgcolor value e0e0ff gt 5 1 2 JUpload Parameters A list of available parameters to customize the product actionURL Address of the server side script which will process the uploaded files This can be an absolute URL or a relative URL relative to the code base of the applet It s possible to append a query string or any other GET parameters to the URL e g for transmitting a session id HTTP and HTTPS are supported pro tocols as well as different ports Note that most webservers are case sensitive lt param name actionURL value http localhost demo JUpload php gt complete URL Set the URL where the browser is redirected after a finished upload process Same rules as for the actionURL lt param name completeURL value http www example com upload ok html errorURL Set the URL where the browser is redirected when JUpload reports any upload errors from the server side lt param name errorURL value http www example com upload error html gt debug Switch on debug mode This will print out much debug stuff on the Java Con sole and possibly write a logfile see debugLogfile parameter lt param name debug value true gt debugLogfile Sets a file name for the debug log filename lt param name debugLogfile value c jupload log gt 34 CHAPTER 5 APPENDIX askAuthentification This setting tells JUpload to ask the user for a username and a password The au
29. plication JUpload has a special feature to encode the path information so the webserver can t remove it JUpload will encode the path information into the content type information be cause the content type can be read by any server side application To switch on this feature use the following parameter tag lt param name useRecursivePaths value true gt If the path information is encoded into the content type it looks like this Content Type JUpload Fgjfg73dfhdlkj3jfdklsdfu4 The prefix JUpload is a string for identification the rest after the Slash is encoded in base64 Your web application in php can simply decode the string by using base64_decode string and can use the path information Some examples You have got the following files on your local filesystem home mike work work10 txt home mike work old work05 txt home mike work backup work02 txt Uploading without the useRecursivePaths feature will result into the server having this information work10 txt work05 txt work02 txt It s not possible to extract the relative path information old backup etc of these files With the recursive path feature enabled the server will receive work work10 txt work old work05 txt work backup work02 txt This is based on the user residing in the home folder and then adding the folder work to the file queue Please note that there are limitations in the length of the content type The functionality of this feat
30. pload jsRemoveFileAt 0 gt 2 4 JUPLOAD PLUGINS lt input type button value Upload onclick document JUpload jsClickUpload gt 19 20 CHAPTER 2 ADMINISTRATION Chapter 3 User manual This section describes the handling of JUpload and its functionality Die to the variety of different settings it s no possible to go into all eventualities 3 1 Handling 3 1 1 Startup When the product is installed correctly on the webserver and the HTML document is coded the applet will be called automatically if this document is opened in a browser The Java Plug In will start up and run the given JUpload class While Java is loading the archive it s possible to display a progress bar When the applet is fully loaded the Java Plug In will check its certificate It will show a dialog with information about the certificate which was used to sign the ap plets archive Please check the certificate for correctness and accept with Yes or with Always Warnung Sicherheit x M chten Sie das signierte Applet installieren und ausf hren das bertragen wird durch Mike Haller Authentizit t des Herausgebers berpr ft durch Haller Systemservice Das Sicherheitszertifikat stammt von einem Unternehmen das nicht als vertrauensw rdig eingestuft ist Das Sicherheitszertifikat ist abgelaufen oder noch nicht g ltig gt gt Caution Mike Haller Gibt an dass dieser Inhalt sicher ist Sie sollten diesen
31. preview will display the dimension of the image file height and width Files of Type Alle Dateien a Figure 3 7 File chooser with image preview in pixel and their file size in bytes 3 1 8 Recursive selection You can select folders in the file chooser which will be added recursively to the file queue That means that every subfolder and every file which is contained in them will be added to the file queue This feature is enabled by default and can be disabled by the administrator 25 26 CHAPTER 3 USER MANUAL 3 1 9 File filter File filter are used to hide files which should not be uploaded at all They filter files by their file type In JUpload there are predefined file filters for all files for images and so on The administrator can create his own file filters e g all Office documents 3 1 10 Error messages Error messages are display in modular dialogs There are error messages about ex ceeded limits connection problems or handling errors 3 2 More help If you need more help on JUpload you can browse to the product homepage http www jupload biz 3 2 1 Online Hilfe Due to space reasons there is no onliny help in the applet But there is a list of known parameters and licensing information You can get the about dialog by clicking on the background under the buttons with the right mouse button 3 2 MORE HELP 27 rif Dateien hinzuf gen y3a tutl 1 pol Dateien entfernen y3a tutl 2
32. ption value Bilddateien Jpeg und GIF gt customFileFilterExtensions Sets a list of file extensions for this custom file filter separated with commas lt param name customFileFilterExtensions value gif jpg jpeg gt maxNumberFiles Sets the maximum number of files to be uploaded lt param name maxNumberFiles value 1000 gt maxNumberFilesWarning Warning message for the maxNumberFiles limit maxNumberFilesTitle Warning title for the maxNumberFiles limit fixJakartaBug If you experience problems using the jakarta fileupload package please try to use this parameter settings lt param name fixJakartaBug value false gt maxFilesPerRequest Sets the maximum amount of files in a single request showServerResponse Enables the display of the server response lt param name showServerResponse value true gt if the server response is disabled the response will be displayed in the realtime response window 38 CHAPTER 5 APPENDIX e Everything failed Figure 5 5 Window with a html response Dateien hinzuf gen Dateien entfernen Hier klicken um das Hochladen der gew hlten Dateien zu beginnen Everything failed Figure 5 6 Error message in the realtime response window preselectedFiles Sets a list of files which will be marked for upload on start of the applet param name preselectedFiles value d webcaml jpg d webcam2 jpg gt realTimeResponse Enables the realtime response window
33. r the current file and for the total upload process The current filename is also displayed The status display shows the state of the application and the process It will display messages about handshaking and how many files are already uploaded It will try to display the bandwidth speed of upload in kilobyte per second and the approx remaining time ETA The upper progress bar will show the progress in percent of the file the lower one shows the total progress 3 1 HANDLING Figure 3 6 Buttons status and progress bar while process is running 3 1 7 Image preview The image preview is a comfortable way to find the file you were looking for The supported file types are the same as Java supports GIF JPEG PNG You can zoom in and out using the mouse wheel only in Java 1 4 or higher amp Dateien hinzuf gen Dateien hinzuf gen Dateien entfernen Dateien 13 Bytes 3 04 MB Sende Datei 6 7 WeESHSEWEW as is BMPS 15 4 115 q3a tut1 title prtl me Jime ia lae PE1994 X 256 35 ACDSee JPG Image 11 05 03 18 25 la PE1 994 X 266 36 KB amp CDSee JPG Image 11 05 03 la PE1994 X 269 19 KB ACDSee JPG Image 11 05 03 18 25 la 1994 280 21 KB ACDSee JPG Image 11 05 03 18 25 la PE1994 X 343 28 KB ACDSee JPG Image 11 05 03 18 25 las PE1994 X 451 32 KB ACDSee JPG Image 11 05 03 18 25 File Name PE1994 X 2668 jpg The image
34. t Type is String gt PARAM NAME labelFiles VALUE Dateien gt lt Type is String PARAM NAME labelBytes VALUE Bytes gt lt Type is String gt PARAM NAME labelAdd VALUE Dateien hinzuf gen gt lt Type is 3 PARAM NAME labelRemove VALUE Dateien entfernen gt lt Type is II var Figure 3 8 Uploading and showing about window 28 CHAPTER 3 USER MANUAL Chapter 4 Developers manual This section of the manual is for Java developers They will find descriptions about the internal application structure 4 1 Programming interface 4 1 1 API JavaDoc You can find the JavaDoc help in the subfolder javadoc The JavaScript API is de scribed in the administrators section 4 20 Notes 4 2 1 Protocols The protocol information can be found here http www faqs org r cs r c1867 html und ftp ftp rfc editor org in notes rfc2387 txt Details about HTTP protocol ftp ftp rfc editor org in notes rfc2616 txt 4 2 2 JavaScript JavaScript LiveConnect packet is not implemented in all browsers Browser Windows Linux Macintosh Internet Explorer 6 Ok Opera 7 Ok Mozilla 1 5 Ok Ok Konqueror Failed not tested Access to HTML form fields If you need to send user inputs with the uploaded files you can use HTML forms For developers included in Netscape Navigator 3 0 java 30 jar 29 30 CHAPTER 4
35. thentification information will be sent via basic method to a secured URL on the webserver e g if you have secured the upload folder with a htaccess file Can also be used if a proxy needs authentification in this way lt param name askAuthentification value false gt 2 Benutzername cs Abbrechen Figure 5 2 Input dialog for the askAuthentification parameter tagName This is the name for the POST variable where the files are stored It de faults to uploadedFiles JUpload will append an increasing number to the end of this string for each file uploaded like uploadedFilesO uploadedFiles1 upload edFiles2 etc lt param name tagName value uploadedFiles gt checkResponse Enable the check of the http server response lt param name checkResponse value true gt showSuccessDialog Shows a dialog to the user when the upload process has finished lt param name showSuccessDialog value true gt Upload erfolgreich X d Upload wurde als erfolgreich gemeldet Figure 5 3 Successful upload imageFileFilter Enable the file type filter in the Add files dialog for images pictures lt param name imageFileFilter value false gt hideShowAll Disable the file type filter for All files lt param name hideShowAll value false gt backgroundColor Sets the main background color for the applet lt param name backgroundColor value e0e0ff gt 5 1 CONFIGURATION 35 showPicturePreview E
36. uftigen gt removeToolTip Set the tooltip text for the remove button lt param name removeToolTip value Klicken um Dateien zu entfernen gt uploadToolTip Set the tooltip text for the upload button lt param name uploadToolTip value Klicken um gew hlte Dateien zu tibertragen gt useRecursivePaths Enables the feature to support recursive and relative path infor mation The path information will be coded into the Content Type field of the upload The reason for this is that many webserver will remove the path infor mation from uploaded files for security reasons The encoding is very simple and can be decoded easily with the PHP function base64_decode strEncodedPath lt param name useRecursivePaths value true gt checkJavaVersion Checks for the installed java version before trying to run lt param name checkJavaVersion value true gt checkJavaVersionGotoURL If the java version is not sufficient for the applet go to this URL lt param name checkJavaVersionGotoURL value http www java com gt browserCookie With this tag you can set a cookie value which will be transferred to the server This can be used for server session ids which cannot be used in the query field or in form fields You must fill this parameter via JavaScript document write param name browserCookie value 2 document write document cookie document writeln gt JUpload can not access the cookies in the browser directly defa
37. ultAddDirectory Sets a starting directory for the Add files dialog lt param name defaultAddDirectory value c dateien gt usePutMethod Enables the PUT method Please read the chapter about the PUT method for details on this superb transfer method which supports file upload resuming and unlimited file sizes lt param name usePutMethod value true gt maxFreeSpaceOnServer Sets the maximum size of the total request lt param name maxFreeSpaceOnServer value 20000000 gt 5 1 CONFIGURATION 37 maxFreeSpaceOnServer Warning Warning message when the limit is exceeded lt param name maxFreeSpaceOnServerWarning value Ihr Server Account ist berf llt maxFreeSpaceOnServerTitle Title of the above warning message lt param name maxFreeSpaceOnServerTitle value Serverplatz reicht nicht aus gt maxTotalRequestSize Sets a maximum size of a single request If a request exceeds this limit it will the splitted into multiple smaller requests A single file size can not exceed this value lt param name maxTotalRequestSize value 2000000 gt maxTotalRequestSizeWarning The warning message for the total request size limit maxTotalRequestSizeTitle The warning title for the total request size limit customFileFilter Enables a customized file filter lt param name customFileFilter value true gt customFileFilterDescription Sets the descriptive text for the customized file filter lt param name customFileFilterDescri
38. ure can t be guaranteed http www php net base64_decode 12 CHAPTER 2 ADMINISTRATION 2 2 3 Debugging In this section the process of finding application errors will be discussed If there are problems in the transmission or the functionality of JUpload you should enable the debug mode to locate the problematic part Enabling the debug mode is done by using the following parameter lt param name debug value true gt Debug messages will be written into the Java Console This console can be opened automatically if your configure it in the The Java Console Log Window can be found at different places in the different browser It can also be accesses by the system tray icon Debug messages give detailed information about the process of the application and the current status With a second parameter you can enable addition file logging lt param name debugLogfile value c jupload log gt or for linux users lt param name debugLogfile value home username jupload log gt It is important that the user has write permissions to that file amp Java Konsole t Konsolenfenster l schen f Objekte in Finalisierungswarteschlange finalisieren 9 Speicherbereinigung h Diese Hilfemeldung anzeigen I ClassLoader Liste ausgeben m Speicherbelegung drucken 0 Protokollieren ausl sen p Proxy Konfiguration neu laden 9 Konsole ausblenden ro Richtlinien Konfiguration neu laden 5 Systemeigenschaften a
39. userpage chemie fu berlin de diverse doc 1S0_3166 html or http ww iso org iso en prods services iso3166ma index html The files are simple ASCII files each line has a keyword and a value The keyword is concatenated by the class name and an identifier Often you can use formatting patterns like n etc While initialising the applet tries to gather information about the locale settings on client side and tries to find the corresponding language file automatically You do not need to specifiy the language explicitly If no corresponding language file can be found a default one will be loaded jupload properties Part of a translated language file HTTPPostRequest 6 Anfrage vorbereiten HTTPPostRequest 8 SecureHTTP vorbereiten HTTPPostRequest 13 ffne Verbindung HTTPPostRequest 16 Lese Dateiinformation HTTPPostRequest 21 Aushandeln 2 2 CONFIGURATION 11 Recursive selection If a folder is selected in the file chooser dialog the folder will be processed recursively This means that all files and folders which are contained in the selected folder will be processed and added to the file upload queue This feature is enabled by default and can be disabled by the administrator The administrator can also enable and disable the feature of transmitting path informa tion Many servers recognize path information in the uploaded files and replace them remove them for safety If you require the path information for your ap
40. usgeben t Threadliste ausgeben v Thread Stack ausgeben x ClassLoader Cache l schen 0 5 Trace Stufe auf n setzen L schen Kopieren Schlie en Figure 2 2 Java Console Log Window 2 3 Programming interface 2 3 1 JavaScript API The interface between Java and JavaScript was developed by Netscape LiveConnect Einstellung im Plugin Control Panel 3http wp netscape com eng mozilla 3 0 handbook javascript livecon htm 2 3 PROGRAMMING INTERFACE 13 With the help of this packet Java can access JavaScript functions and DOM and vice versa Both is used by JUpload Using JavaScript functions you can remote control the applet But before being able to do so you must name the applet with a specific name lt applet width 123 height 456 name JUpload alt My Applet gt lt applet gt With the name tag the applet can now be accessed as document JUpload In the following section we will describe the JavaScript functionality 2 3 2 Functions jsIsReady Returns true if JUpload is ready to be remote controlled jsRegisterAddListener String Hooks the given javascript function to the Add Adding files event See next section for details jsRegisterAddedListener String Hooks the given javascript function to the Added After all selected files have been queued event See next section for details jsRegisterRemoveListener String Hooks the given javascript function to the Re move Remov
41. yz gt No Java 2 SDK Standard Edition v 1 3 support for APPLET lt APPLET gt The following code is an example for the equivalent Java Plug In tag as you can see it in the documentation of Sun Microsystems lt The following code is specified at the beginning of the lt BODY gt tag gt lt SCRIPT LANGUAGE JavaScript gt lt var _info navigator userAgent var _ns false var ie _info indexOf MSIE gt 0 amp amp _info indexOf Win gt 0 amp amp _info indexOf Windows 3 1 lt 0 gt lt SCRIPT gt lt COMMENT gt lt SCRIPT LANGUAGE JavaScriptl l var ns navigator appName indexOf Netscape gt 0 amp amp info indexOf Win gt 0 amp amp _info indexOf Winl6 lt 0 amp amp java lang System getProperty os version indexOf 3 5 lt 0 I info indexOf Sun gt 0 gt lt SCRIPT gt lt COMMENT gt lt The following code is repeated for each APPLET tag gt lt SCRIPT LANGUAGES JavaScript gt lt if ie true document writeln OBJECT classidz clsid 8AD9C840 044E 11D1 B3E9 00805F499D93 width 200 height 200 alignz baseline codebase http java sun com products plugin 1 3 jinstall 13 win32 cabfVersion 1 3 0 0 gt lt NOEMBED gt lt XMP gt else if ns true document writeln EMBED type application x java applet version 1 3 width 200 height 200 align baseline code XYZApp class code

Download Pdf Manuals

image

Related Search

Related Contents

Uniden TRU8866 Owner's Manual  協約評価シート(総括) 【評価結果】 優良 総合評価  Hotpoint BHWM129 washing machine  Calculo de Edad Gestacional  ACTi KCM-5611 Manual    see manual  GF28WW, GF33PT, GCN40T www.bostitch.eu  Philips AVENT SCF606  Homework 10 Software Design Considerations  

Copyright © All rights reserved.
Failed to retrieve file