简体   繁体   English

在 Azure Logic App 中,如何在(创建文件操作步骤)中创建具有视频标题和视频 ID 的文件名?

[英]In Azure Logic App ,how to create a file name that has Video Title and Video ID in the (Create File action step)?

I have created a 1st Logic app: that allows a user to upload a.mp4 media file into a folder on OneDrive, and the logic app checks to see if there is new file on that OneDrive folder.我创建了第一个逻辑应用程序:它允许用户将 .mp4 媒体文件上传到 OneDrive 上的文件夹中,逻辑应用程序检查该 OneDrive 文件夹上是否有新文件。 If there is new file, it will trigger the logic app and Index the video onto https://www.videoindexer.ai/ .如果有新文件,它将触发逻辑应用程序并将视频索引到https://www.videoindexer.ai/上。

2nd - Logic App: After the video is indexed to https://www.videoindexer.ai/ , I want the user to pick language(s) from the custom web page that I have created, for caption translation.第二 - 逻辑应用程序:在视频被索引到https://www.videoindexer.ai/后,我希望用户从我创建的自定义 web 页面中选择语言,用于字幕翻译。 Once the user choose the language(s) they click on "submit" and this will send the data(languages) to my 2nd logic app URL end-point, and trigger my second logic app(shown below) and get the captions based on the user's selection of languages.一旦用户选择了他们点击“提交”的语言,这会将数据(语言)发送到我的第二个逻辑应用程序 URL 端点,并触发我的第二个逻辑应用程序(如下所示)并获取基于用户选择的语言。 Finally, it will then output those caption files on to a OneDrive folder.最后,它会将这些字幕文件 output 放到 OneDrive 文件夹中。

Right now, the caption file names are in format of: videoID_language.vtt (Example: e0b3483dd1_en-US.vtt).目前,字幕文件名的格式为:videoID_language.vtt(示例:e0b3483dd1_en-US.vtt)。 The problem with this format is that, lets say we have multiple videos, the user will find it hard to match which caption file belongs to which video.这种格式的问题在于,假设我们有多个视频,用户会发现很难匹配哪个字幕文件属于哪个视频。 So that is why I am looking to add video title name, so that they know which caption file are for which video.这就是为什么我要添加视频标题名称,以便他们知道哪个字幕文件适用于哪个视频。

My question is: How can I also add video Name to the file as well?我的问题是:如何将视频名称也添加到文件中? So lets say I have video tile such as "AzureFunction".因此,假设我有诸如“AzureFunction”之类的视频磁贴。 I want my VTT file name to look like this AzureFunction_e0b3483dd1_en-US.vtt我希望我的 VTT 文件名看起来像这样 AzureFunction_e0b3483dd1_en-US.vtt

What I tried to do was change the file name query From this:我试图做的是更改文件名查询从此:
concat(triggerOutputs()['body']['videoId'],' ',item(),'.vtt') TO this: concat(triggerOutputs()['body']['name']['videoId'],' ',item(),'.vtt') concat(triggerOutputs()['body']['videoId'],' ',item(),'.vtt') 到这个: concat(triggerOutputs()['body']['name']['videoId' ],' ',item(),'.vtt')

But it gives an error because, it does't know the 'name'.但它给出了一个错误,因为它不知道“名称”。 How to include the video name as part of my title?如何将视频名称包含在我的标题中?

Here is the 2nd logic app workflow, that I am using to create the file:这是我用来创建文件的第二个逻辑应用工作流: 在此处输入图像描述 在此处输入图像描述 在此处输入图像描述 在此处输入图像描述

What I tried to do was change the file name query From this: concat(triggerOutputs() ['body']['videoId'] ,'',item(),'.vtt') TO this: concat(triggerOutputs() ['body']['name']['videoId'] ,'',item(),'.vtt')我试图做的是改变文件名查询从这个: concat(triggerOutputs() ['body']['videoId'] ,'',item(),'.vtt') 到这个: concat(triggerOutputs() ['body']['name']['videoId'] ,'',item(),'.vtt')

triggerOutputs() returns a JSON object. triggerOutputs()返回 JSON object。 Based on the FIRST code, that JSON structure is body (object) > videoId (property).基于 FIRST 代码,JSON 结构是 body (object) > videoId (property)。 Changing it to your SECOND version indicates that the structure is body (object) > name (object) > videoId (property).将其更改为您的 SECOND 版本表示结构是 body (object) > name (object) > videoId (property)。 It seems unlikely that the name property has a videoId subproperty. name 属性似乎不太可能具有 videoId 子属性。

More importantly, you said the error indicated "it doesn't know the name", which would indicate that there is no name property on the triggerBody.更重要的是,您说错误指示“它不知道名称”,这表明 triggerBody 上没有名称属性。 You say you tried to concat the video name - how are you getting the name of the video?您说您尝试连接视频名称 - 您如何获得视频名称? Or is that your question?或者这是你的问题? Since the triggerBody is an HTTP request, it is not clear that the video name is part of the HTTP request.由于 triggerBody 是一个 HTTP 请求,因此不清楚视频名称是 HTTP 请求的一部分。 If you have the ID, is there another Video Indexer action that you could use to retrieve the Name?如果您有 ID,是否可以使用另一个视频索引器操作来检索名称?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Azure逻辑应用程序:在Blob中创建CSV文件 - Azure Logic App: Create CSV File in Blob 如何通过 Azure 逻辑应用程序在共享点创建空白 Excel 文件 - How to create blank excel file at sharepoint through azure logic app 在通过 Azure 逻辑应用程序中的创建 blob 操作完成整个写入操作之前,Azure blob 容器中的 0 kb 文件 - 0 kb file in Azure blob container before entire write operation completes via Create blob action in Azure Logic App 在 azure logic App 中如何创建一个 10 位整数的唯一 ID - In azure logic App how to create a 10 integer digit unique id 无法使用Azure Logic Apps的SharePoint创建文件操作创建.zip文件 - Can't create .zip file with Azure Logic Apps' SharePoint Create File action Azure在向逻辑应用程序发布请求后创建一个驱动器文件 - Azure create one drive file on post request to logic app 如何为 Azure ACR 创建 Azure 逻辑应用程序? - How create azure logic app for Azure ACR? 如何在Azure逻辑应用中创建条件对象? - How to create conditional objects in Azure Logic App? 如何为 azure web 应用创建 csr 文件 - How to create a csr file for azure web app 如何使用“创建容器组”操作将私有Docker集线器映像部署到Azure Logic应用 - How to deploy a private docker hub image to an Azure Logic App using the 'Create container group' action
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM