Page 1 of 1

jFileDownload with SCP

Posted: Fri Jul 27, 2012 12:45 pm
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!

Re: jFileDownload with SCP

Posted: Sun Aug 12, 2012 10:37 am
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">');