jFileDownload with SCP

Files and folders downloader add-on with resume support.
Post Reply
Posts: 2
Joined: Fri Jul 27, 2012 12:36 pm

jFileDownload with SCP

Post by glaucioklipel »

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!

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

Re: jFileDownload with SCP

Post by support »

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

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">');

Post Reply