开发者

Can't put file into ram with secure ftp

I'm using coldfusion 9 and I'm trying to grab a file from an ftp site and load it into ram instead of the filesystem. If I try it using a secure ftp connection, it fails with this error:

An error occurred during the sFTP getfile operation. Error: C:\JRun4\servers\cfusion\SERVER-INF\temp\cfusion-war-tmp\ram:\test.txt (The filename, directory name, or volume label syntax is incorrect). Check for a bad path, filename, or directory.

If I try the same thing with a non secure ftp site it works just fine. Here is the code:

<cfftp action = "open" 
username = "xxxxx" 
connection = "M开发者_如何转开发y_query" 
password = "xxxxxxx" 
server = "ftp.xxxxxx.com"
port="13266"
secure = "true" 
stopOnError = "Yes">

<cfftp action="getfile"
connection="My_query"
remoteFile="/something.txt"
stopOnError="true" 
localfile="ram://test.txt">


Adobe has confirmed this as a bug and has resolved it in ColdFusion 9.0.1


This looks like it might be correctable if you escape portions of the string.

Try replacing ram://test.txt

with

ram:///test.txt

Also, you can try escaping the ":" character.

This type of activity is only safe if you are an advanced user. Messing around with illegal characters when transferring files has an inherent risk of leaving garbage behind on your disk.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜