Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Passing parameters to JUPLOAD from PHP/JS  (Read 5362 times)

0 Members and 1 Guest are viewing this topic.

macanderson

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Passing parameters to JUPLOAD from PHP/JS
« on: September 14, 2009, 04:58:46 am »


Hello everyone,

Is there any way to control the applet from PHP/Javascripts, where you can control its processes such as aborting a file transfer, skip a file, etc?

For example, you select a bunch of files to upload. You upload halfway and the line got disconnected. By then, say 60% of the files already been uploaded. But JUPLOAD client doesn't know that, and you don't want to repeat uploading the same files. On your server side, you have scripts to check for files existence, even their filesize.

If you can control the applet in such manner, you can tell it to skip the existing files, but continue on the other files. Currently, JUPLOAD continues to upload everything (if you choose to overwrite existing files).

I was trying out with the applet param "stringUploadError", and issued ERROR upon detecting a duplicate (server side).  JUPLOAD would pop up an error box, but would not continue with the other files transfer after that.

Would appreciate any workaround or tips.

Thanks.


Cheers,
Mac.


Logged

etienne_sf

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 908
    • Wiki
Re: Passing parameters to JUPLOAD from PHP/JS
« Reply #1 on: September 14, 2009, 06:24:19 pm »

Hi,

  This question is out of topic.  I LOCK THIS THREAD.


It is relative to the applet itself, no to the JUpload For Coppermine plugin (which is based on the applet).
Please the relevant forum:
http://sourceforge.net/forum/forum.php?forum_id=199107

About your question(s):
1) The applet won't try to upload several time the same file. Once a file is uploaded, it is removed from the file list.
2) There is no way to control the upload through javascript.
3) What you can do through javascript is:
- Update any applet parameter.
- Start the upload
- be notified when the upload is finished (with the status: success or error)
4) To stop an upload, you can right an error string, like you tried. I don't see any added value of javascript here... perhaps I missed something ?
5) You can also right a WARN message (see the stringUploadWarning applet parameter). A line beginning by WARNING: would generate a popup, and let the upload go on.

Etienne




Etienne
Logged
Pages: [1]   Go Up
 

Page created in 0.029 seconds with 19 queries.