在我的Mule 4应用程序In存储连接器中,要成功地将blob上载到Azure容器:

但是,这会将该文件添加到“my”的根目录中。
我想将该文件添加到my-container/examples -即我的容器中的示例文件夹中。
我怎样才能在Mule 4中做到这一点?
连接器XML (编辑):
<azure-storage:upload-blob doc:name="Upload Json" doc:id="63fa613e-b355-4b6f-9f81-4ddd8dd40998" config-ref="azure_storage_config">
<azure-storage:storblob container="my-container" fileStream="#[payload]" fileName="file.json"/>
</azure-storage:upload-blob>发布于 2022-11-17 09:13:38
其实只有一层容器。您在Azure中所看到的文件夹仅是“虚拟”文件夹,这些文件夹是通过实际以分层方式命名对象来创建的。
换句话说,所有对象都直接存储在容器中,当您在文件夹中创建文件时,实际上要做的是创建名为folder/filename的文件。
因此,您可以通过在连接器中传递像examples/file.json这样的文件名来创建“虚拟”文件夹。
<azure-storage:upload-blob doc:name="Upload Json" doc:id="63fa613e-b355-4b6f-9f81-4ddd8dd40998" config-ref="azure_storage_config">
<azure-storage:storblob container="my-container" fileStream="#[payload]" fileName="examples/file.json"/>
</azure-storage:upload-blob>https://stackoverflow.com/questions/74406285
复制相似问题