Hello,
I build a Task for download a file from my ftp server.
I tried with
fileCopy(“ftp://#username#:#password#@#server#:#port#/#fineName#”, destinationPath );
an run correctly!
I tried with
var result = progressableDownloader.download(
‘ftp://#username#:#password#@#server#:#port#/#fineName#’,
destinationPath,
function( status ) {
progressBar.update( argumentCollection = status );
}
);
show this error:
No matching Method/Function for sun.net.www.protocol.ftp.FtpURLConnection.setInstanceFollowRedirects(boolean) found
C:\Users\Emanuele.CommandBox\cfml\system\util\ProgressableDownloader.cfc: line 198
196: // The reason we’re following redirects manually, is because the java class
197: // won’t switch between HTTP and HTTPS without erroring
198: connection.setInstanceFollowRedirects( false );
progressableDownloader is very beautiful, is it possible use this component for FTP protocol?
The progressable download could probably be modified to work with FTP connections. I’m using some Java classes behind the scenes and I probably call some methods that are specific to the HTTP protocol. Would you like to put in a ticket for the enhancement and possibly take a stab at it? There are advantages to the download as it uses a progress bar and can be interrupted with Ctrl-C.
The ticket looks great. You can just edit the CFML files directly in the root of the .CommandBox/cfml/system folder and then run the “reload” command to pick up any changes. If you plan on doing a lot of CommandBox dev, clone the repo, delete the cfml directory from your CommandBox home and symlink in the cfml directory from the repo. Restart the shell and REVERT any changes to the webroot. Then you can just pull the latest changes in the repo to get the latest CFML code. This works great so long as I haven’t updated any of the jars, which would require a fresh box.exe.
Also, the equiv to dump() in the CLI is
systemOutput( myVar, true );
Note it handles complex values as well like structs and arrays.