jFileDownload with SCP

Files and folders downloader add-on with resume support.

jFileDownload with SCP

Postby glaucioklipel » Fri Jul 27, 2012 12:45 pm

Hi there!

I'm very interested in jFileDownload's SCP capability for an PHP application.

I want to feed the applet with username, password, file path and filename from a javascript function on this php app. To understand the scenario:

The PHP frontend will take uploads and copy those files via scp to the storage server, will save path and filename of this specific upload in a PostgreSQL DB. Then, from the PHP frontend I will generate links for these files that has been uploaded. From each link, on onClick event, it will read a javascript function that invokes scp file copy, that copies that specific file from the storage server.

By now all the examples were on upload files with SCP and download with http or sftp/ftp protocol. I don't need any interface but the file destination folder choose to save the file on local filesystem, the app will provide the username and password via SESSION and the path and filename via DB.


Can you please help me!?

Many many thanks!
glaucioklipel
 
Posts: 2
Joined: Fri Jul 27, 2012 12:36 pm

Re: jFileDownload with SCP

Postby support » Sun Aug 12, 2012 10:37 am

You want an hidden applet that will download file over SCP?

To configure JFileDownload with SCP, start from JFileDownload FTP HTML/JavaScript sample, then add in ARCHIVE parameters:
Code: Select all
lib/scpimpl.jar,lib/jsch.jar

You need to copy these files under lib/ folder too.

and update the url parameter with scp:// url such as:
Code: Select all
document.writeln('<PARAM NAME="url" VALUE="scp://localhost">');

And more sure so have:
Code: Select all
document.writeln('<PARAM NAME="param3" VALUE="accountpwd">');
document.writeln('<PARAM NAME="value3" VALUE="true">');
document.writeln('<PARAM NAME="mode" VALUE="ftp">');
User avatar
support
 
Posts: 1501
Joined: Sun Jan 27, 2008 6:19 pm


Return to JFileDownload



cron

Sitemap | Privacy Statement | Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc.
in the U.S. and other countries. All other company and/or product names are the property of their respective owners.