Attached is a free Servoy plugin to handle uploading and downloading files on your App server. You must have SSH running and the port opened (if firewall) on your app server for this plugin to work (since that is how it transfers the files). This is not a bean…it is only a plugin, so all commands are sent via methods.
You can see an example my doing a move sample on the “put” or “get” method. This plugin will support authenticate through username & password, or a public key string.
INSTALL:
There are 2 files in the attached zip. Put the j2ssh-core.jar in the Servoy lib folder (/Servoy/lib) and the sftp.jar in the Servoy plugins folder (/Servoy/plugins).
NOTE: THIS PLUGIN IS AS IS, NO WARRANTY - YOU’RE ON YOUR OWN - MAKE BACKUPS IF NEEDED.
UPDATE: This plugin will be added to the free IT2Be suite. IT2BE will be able to provide support for this plugin. Please contact Marcel with any questions. For now, I have removed the download so we don’t cause any confusion. You can expect a message from Marcel within a few weeks.
Just so you know, the plug-in is already added to the framework.
I will do a little polishing and need to finish some other stuff but it will become available beginning next week.
Marcel, not something extra - it was first on my list! I appreciate the plugin is a freebie and your suggested improvements to make/rename/delete folders, rename and delete files, and change permissions will add functionality and cover all the other suggested additions, thanks
It wasn’t clear from the examples that these are single sessions - cleanUp() and createSSHClient() and the tip ‘remember to disconnect’ suggested the creation of persisting sessions, leading me to contribute the suggestion that terminal-like commands - even a generic one like sendFtpCommand(string) - would be quicker and more efficient than a series of single sessions. Seems I misunderstood… Nowhere better to sort that out, and noone better to ask!
I could make the sessions persistent if that helps you do what you want to achieve but that would not make it into the next release because it requires restructuring.
When you want this to happen please make it a feature request.
Does anyone know of a plugin (not a bean) that handles plain FTP (of the Port 21 variety with no need for SSH on the FTP server)? It seems this one is just for secure FTP.