My database filename is test.upm. The remoteLocation is ftp://ftp.domain.com/upload/upm/. When this method is called fullRemoteLocation will be "ftp://ftp.domain.com/upload/upm/" and fileName will be "test.upm". Since fullRemoteLocation refers to a directory getRemoteFile() fails (since a directory can't be downloaded).

Based on my understanding I think we need to pass (fullRemoteLocation + fileName) into getRemoteFile().

What do you think?