Auto Log Out avaiable?

Explorer-like frontend add-on to upload/download.
Post Reply
schandmaennchen
Posts: 3
Joined: Thu Mar 26, 2009 4:23 am

Auto Log Out avaiable?

Post by schandmaennchen »

Hi all!

I'm searching for a good uploader / downloader quite a long time now - and I think (hope) the JDiskExplorer fits...
But unfortunately I have a "special" problem:
I plan to use the uploader tool to transfer files from (more or less) public used computers (at University) to my private webspace (USB-Sticks are not allowed)

The problem is, there are a lot of files to transfer - and the upload procedure takes a long time - so I just leave the browser window open when I go away in order to finish the uploads while I'm away.

First of all I need a log in function - so I'm the only person who can transfer files to my webspace (I hope JDiskExplorer provide this) - can I use "different" usernames from the FTP-Login-Data? Second: I was wondering if there is an auto-logout function after transferring is completed.
Normally I'm still logged-in after the transfer is completed - so anyone sitting at this computer after me could transfer files to my webspace as well.
For security reasons it would be great if the script could perform an auto log-out after the transfer is completed or aborted!

Is there a way to implement this?

Thanks a lot!
cu

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Auto Log Out avaiable?

Post by support »

For login prompt, use:
<PARAM NAME="authentication" VALUE="auto">
and remove all username/passwords parameters from Applet.
It is detailed in the FAQ at:
http://www.jfileupload.com/products/jdi ... aq.html#15

For auto logout, there is solution if you upload only, do you upload only ?
In fact the FTP session is closed as soon the as applet is stopped/unloaded. If you enable "forward" parameter then the applet redirects to another web page after successful uploads.
<PARAM NAME="forward" VALUE="http://server.com/completed.html">

Could you try it ?

schandmaennchen
Posts: 3
Joined: Thu Mar 26, 2009 4:23 am

Re: Auto Log Out avaiable?

Post by schandmaennchen »

Yes - that works fine....

...but... :D
If some presses the "Chancel" Button during the Upload-Process, the applet remains logged in.
Is there any chance to modify the chancel-procedure so that there is an auto-logoff as well?

THX

EDIT: OK - I think the easiest way of solving that problem is do deactivate the Chancel Button! :mrgreen:

Butanyway: What about the error-handling? If there is an error like "not enough space", and so on - an auto-log off would be nice...

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Auto Log Out avaiable?

Post by support »

You could install the JSAPI add-on, then you will get a JavaScript callback on each error and you can redirect. Same for cancel event.
http://www.jfileupload.com/products/tools/index.html

schandmaennchen
Posts: 3
Joined: Thu Mar 26, 2009 4:23 am

Re: Auto Log Out avaiable?

Post by schandmaennchen »

THX, that sounds cool...

One last question before I buy the applet:
I've downloaded the JSAPI add-on and tried to set it up: But, there is only an file for the
JFileUpload HTML-Uploader. Is it possible to use it with the FTP FileExplorer as well (just by editing the .js file from the FileExplorer (add this MAYSCRIPT and the other missing commands in this file)

And, second: I wasn't able to test the JSAPI add-on because I have no idea of where to insert the redirect command (what kind of command, and: where should I insert this (in the HTML-File?)).

Is there an tutorial for that, or can just write down what kind of command and where to insert...

Hope this was my last question!
Many thanks for your help...
cu

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Auto Log Out avaiable?

Post by support »

I enclose a sample as attachment for JDiskExplorer + JSAPI. You just have to download and copy JAR files for JFileUpload + JDiskExplorer + JSAPI into lib/ folder. Then open applet_ftp_jsapi.html in your browser and try to upload a file. You will see the JavaScript callbacks with filenames. You have a JavaScript function when upload fails or is cancelled.
JDiskExplorer_JSAPI.zip
Sample
(5.99 KiB) Downloaded 975 times
Note that JSAPI works with upload only, not for download.

For forward, there are 2 solutions:
1 - In applet_ftp_jsapi.js, add <PARAM NAME="forward" VALUE="http://server.com/page.html">
2 - In applet_ftp_jsapi.html:

Code: Select all

function JSTransferDone(filelist)
{
   // Redirect here with location.url JavaScript features
}
I think you need solution #2 that you can be extended to JSTransferCancelled() and JSTransferFailed().

Does it help ?

Post Reply