首页 文章

azure ftp到Dropbox连接器无法在逻辑应用程序中工作

提问于
浏览
0

在发布后大约一个小时,我想到了下面的内容 . 目前还没有很多例子,所以我把它留了下来 .

我正在尝试在Azure Logic App中设置新连接器以从FTP站点获取文件并将其移动到Dropbox文件夹 .

我甚至没有获得Dropbox部分,虽然它找到了FTP站点然后删除了文件 .

我有一个名为testing off的测试目录:ftp://eek.myftpsite.com/testing/

我显然不理解这个过程的基本内容 . 我附上了ftp连接器及其动作的图片 .
enter image description here
以下是触发器的代码:

"operation": "TriggerOnFileAvailable",
            "parameters": {
                "triggerState": "@coalesce(triggers()?.outputs?.body?['triggerState'], '')",
                "FolderPath": "testing",
                "FileMask": "CSV*",
                "FileType": "Text"

并且行动的代码(这部分原来不需要):

"operation": "GetFile",
            "parameters": {
                "FilePath": "@{triggers().outputs.body.FilePath}",
                "FileType": "Text"
            },
            "authentication": {
                "type": "Raw",
                "scheme": "Zumo",

当我在ftp文件夹中删除一个名为CSV_test2.txt的文件,其中包含一行文本时,在短暂的位之后它将被删除 - 正如预期的那样 . 如果我转到触发器历史记录,它会显示它已成功触发 . 触发器的输出看起来也是正确的(事实证明):

"body": {
    "FileName": "CSV_test2.txt",
    "FolderPath": "testing",
    "FilePath": "testing\\CSV_test2.txt",
    "ServerAddress": "eek.myftpsite.com",
    "Content": "This is the data in the test file.",
    "ContentTransferEncoding": "None",
    "triggerState": "CSV_test2.txt"
}

但是,如果我转到它显示为失败的操作(因为我错误的下一步,它应该是一个需要文件路径的东西,比如dropbox) . 操作的输入显示:

"operation": "GetFile",
"parameters": {
    "FilePath": "testing\\CSV_test2.txt",
    "FileType": "Text"
},
"apiVersion": "2015-01-14",
"authentication": {
    "scheme": "Zumo",
    "type": "Raw"
}

这似乎对我来说是正确的(不是) . 输出显示:

},
"body": {
    "status": 404,
    "source": "https://ftpconnectora4cf805ee5114235ad1c43445a153673.azurewebsites.net/file/testing/CSV_test2.txt?FileType=Text",
    "message": "Path does not exist on FTP Server. The remote server returned an error: (550) File unavailable (e.g., file not found, no access)."
}

我已经尝试了我能想到的所有组合,包括硬编码路径和文件名 - 都无济于事 . 我真的想要尝试将这个工作放在一个新项目上,而不是以“旧”的方式 .

乔,欢迎任何建议

1 回答

  • 0

    我误解了它是如何工作的 . 我以为你设置了一个FTP连接器,然后监视新文件,然后你设置另一个FTP动作来获取每个新文件 . 结果我有点过度思考 .

    不,只是像这样直接输出输出:

    enter image description here

    它的代码是:

    "operation": "UploadFile",
                "parameters": {
                    "FilePath": "@{triggers().outputs.body.FilePath}",
                    "content": {
                        "Content": "@{triggers().outputs.body.Content}",
                        "ContentTransferEncoding": "None"
                    },
                    "overwrite": true
    

    非常酷......我正在离开我的糊涂,希望能帮助其他人 . 这都是很新的东西,但非常令人兴奋 .

    谢谢,

相关问题