JUpload plugin for coppermine

Author: Etienne Gauthier Accound etienne_sf (on sourceforge and coppermine forums)

Note: This plugin has no link with the jupload.biz web site, which is not open source.

The Coppermine plugin is available here: behind this link. The java sources for the applet are available here: http://sourceforge.net/projects/jupload/

You can test the plugin, by going to my test web site :

Login: coppermine

Password: jupload

Support forum changed. It's now available in a new board, at http://forum.coppermine-gallery.net/index.php/board,100.0.html


This pack is a plugin for the Coppermine Picture Gallery, which allows you:

  • Batch upload pictures from within the Gallery (without any exterior tool),
  • Preview and rotate pictures before upload,
  • Very easy selection of multiple files,
  • Very simply upload process, in only two pages:
    • One page with basic album management, and the upload applet,
    • One page, after upload, to enter name, description, key words for all uploaded pictures.

This plugin is translated in the following languages: Danish, Dutch, English, Esperanto, French, German, Italian, Japanese, Norwegian, Polish, Bresilian Portugese, Slovenian and Spanish.

In the default configuration, pictures are resized down to the gallery maximum size before upload: this make upload quicker, and allow easy upload of pictures from modern camera, even on ISP that has a too low maximum upload size.


Upload pictures

By using this applet, the main user improvements are:

  • Uploading several pictures (no limit) in only _two_ web pages:
    1. Page1 (click on the JUpload menu item or open jupoad.php page): choose category (for admins), select album (or create/update album), select picture files, preview and/or rotate them, upload,
    2. Enter picture name, description and key words for all uploaded pictures at once.
  • Upload is quicker, as pictures are resized by the applet before upload,
  • The plugin allows the user to both: manage albums and upload pictures,
  • Upload pictures without having to manually resize them before upload (my Canon EOS20D pictures are bigger than the upload limit of my free ISP hosting),
  • It's possible to upload file of any type, provided that your current Coppermine configuration allows it. Preview works only for pictures.
  • When you're browsing to a category or an album, click on the JUpload link: the upload page will open, with this category or album selected.

The applet allows the user, before upload, to:

  • Select multiple files on his hard drive, in a much easier way than the standard Coppermine upload form,
  • Drag'n drop files from your favorite picture editing tool,
  • Preview pictures,
  • Display a full screen picture (by clicking on the previewed picture),
  • Rotate the picture right or left,
  • Download pictures and select the upload album on the same web page,
  • Upload all pictures/files in one click,
  • Not wait for each picture upload : if the session times out after upload, all pictures are still correctly stored in the selected album,
  • Edit all picture properties in one page (the property page for the uploaded pictures is automatically opened after a successfull upload).

JUpload configuration

You can easily configure the JUpload plugin, by going to the plugin management page (from the first section of the Coppermine configuration page). From this page, the main configuration parameters are:

  • Should the JUpload link be available for all users, or only from users allowed to upload pictures.
    • If all user can see the link, users who may not upload pictures (like non authenticated users) will be redirected to the login page.
  • Chunk management. By using this parameter, the applet will split the files before upload, so that you can upload files bigger than the maximum upload file size allowed by the server.
  • And much more …
    • You'll find all info on the configuration page (and in the saved file, see below)


Java Part

All informations about the applet itself is available here: http://sourceforge.net/projects/jupload/


  • The applet retrieves the session from the navigator, to upload files within the same user session (it reads cookies from the navigtor, and the current server protocol back from the server, in an applet parameter: not nice, but I didn't find any other way),
  • The applet is signed. The user is then prompt to accept or not the applet certificate. Accepting it is mandatory, to let the applet access to the files stored on the local computer,
  • It resizes picture to the maximum coppermine size _before_ upload : the network traffic is smaller/quicker, and the load on the server is smaller. This resizing functionnality is especially useful for pictures made by modern camera: their pictures are often too big for the maximum upload size allowed on servers.

PHP Part

  • Files are stored in the /plugins/jupload/* directories:
    • Main files are in this directory.
    • The /plugins/jupload/include/ contains files common to several files for the plugin. It also contains refactoring of includes coming from Coppermine, so that they can be reused here.
    • The /plugins/jupload/lang/ contains the translation text for the plugin.
    • The /plugins/jupload/page/ contains one php file for each page that the user can see.
    • The /plugins/jupload/user/ contains any user specific include. It contains the config.inc.php file that contains the jupload configuration, if the gallery admin save any configuration from the plugin management page.
  • No special coppermine configuration.

To access to the plugin, one of these conditions, at least, must be met:

  • The user may upload pictures,
  • The gallery is in admin mode,
  • The galery is in user admin mode.


Version prior to 2.1.0

  • Until 2.0.0, JUpload was not a plugin.
  • 2.0.0 is a first, unsuccessfull, attempt to construct a plugin.

All users should migrate to a most recent version to use JUpload as a Coppermine plugin.

With the plugin management page

This work since JUpload version 2.1.0.

To use this pack, you just have to go the plugin management page, from the first section of the Gallery configuration page. Just use the upload button on the plugin management page, to upload it, then click on the 'i' to install it.

A JUpload link will be available for use who may upload pictures.

Any existing JUpload configuration is keeped, when installing a new version: the user/config.inc.php file is never in the JUpload package.

With FTP upload

On some configuration, the previous way doesn't work. For instance, the web server need write access on the plugins directory, and the php zip extension must be activated.

In this case, you'll have to:

  • Unzip the jupload package on your local computer,
  • Transfer the jupload directory under the /plugins/ directory, with FTP for instance.

The resulting directory tree should look like this :


If it was not already before, you'll then have to go the [b]plugin management page[/b], from the first section of the Gallery configuration page and click on the 'i' (on the right of the JUpload line) to install it.


General ideas

Before asking for support, you should :

  1. Check that standard upload works with the same login.
  2. Put the debug on. To do this, you can set the applet debugLevel parameter to 100, in the plugins/jupload/upload_page.php script, or, while using the applet, do a CTRL + right-click on the status area or the file list of the applet, and select the 'debug on' entry in the popup menu that should appear.

Usually, problems occur during upload, so check the debug output, to see what the server answered. To do this:

  • Debug must be on
  • Select all in the status area (click into it, then CTRL-A to select the whole text)
  • Copy it into a text editor, and try to read it.
  • The server response is written between the lines containing '——– Server Output Start ——–' and '——— Server Output End ———'.

What you should see:

  • First line MUST contain '200 OK' (e.g. full line should look like 'HTTP/1.1 200 OK'). If you get any other number, you have a problem that is local to your installation. Check this page to know what means this return code: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
  • If you get 200 OK, that means that you get a 'normal' response from the server, that is from coppermine. But this response can be a message explaining an error to you. So, check the first empty line. The real response from coppermine comes after.
  • This response should be a simple line containing 'SUCCESS'. If so, upload was Ok. Any problem you have is after.
  • If not, the result can be a simple error message or a full HTML page.
    • If it is a simple error message, see if you can correct it.
    • If it is a full HTML page, you can copy the full server response (between the empty line and the line containing '——— Server Output End ———'), save it into a file named 'err.html', and open it with your navigator. You'll be able to see the coppermine response. You can then understand, and try to correct the problem.


The FAQ is available on the JUpload FAQ page.


  1. To get support about the coppermine plugin: the best way is to post a message into the coppermine upload mods forum, for this applet. I'll receive a notice in my personal mailbox.
  2. To get support about the applet itself, the best way is to post a message into the sourceforge forums. Here again, I'll receive a notice in my personnal mailbox.

Outils personnels