从逻辑应用程序对 azure 文件服务中的新文件执行操作

perform a action on new files in azure file service from a logic app

我有一个 Azure 存储帐户,文件服务名为 container-ftp。

我需要一个进程来将登陆这里的文件移动到 FTP 服务器。 目前没有 Azure 文件存储连接器的触发器。

我已经设置了一个预定的触发器 运行 每 :30

但是我如何才能找出哪些文件是新文件或其中有哪些文件? 我可以在 运行s 之后删除文件,这有帮助吗?

使用 blob 存储我通过在 blob 存储中创建文件时使用触发器来工作,但他们想要使用文件与 Blob 存储。

我该怎么做?

因为还没有触发器,最简单的方法是处理完文件后删除。否则,您将需要保留触发状态或轮询水印(存储在其他地方,如 Azure 存储 Table)以了解您上次检查的时间,然后仅获取在该轮询水印之后修改的文件。

目前Azure Logic应用中还没有针对Azure文件存储的触发器,a feedback: Add trigger for Azure File Storage已提交,大家可以投票。

how can I find out what files are new or are in there? I am OK with deleting the file after it runs, so does that help?

正如您所说,您可以尝试在执行操作(读取文件并上传到 ftp)后删除文件,这可以防止您的逻辑应用上传“旧”文件。

此外,如果可能,您可以尝试其他方法将文件从 Azure 文件存储移动到 FTP 服务器。例如,您可以mount the Azure File share and run a FileTrigger WebJob检测是否有新文件到达并上传文件到FTP服务器。