我一直在尝试在存储在Azure Blob上的.mp4视频中添加元数据。我想添加OpenGraph标签,并且当我尝试输入它们时,我会收到一条消息,上面写着:“名称:'og:type'应该是有效的C#标识符。”我不是C#开发人员,也无法找到显示元标记有效C#标识符的文档。任何帮助将不胜感激,谢谢!
编辑:我必须误解了元数据部分的目的,因为我认为它会在视频页面上的文档中添加HTML元标记。你知道这是否可能吗? 链接时,能够在线播放或至少具有图像预览。
例如,我想在社交媒体网站上共享指向此视频的链接,并想尝试使该视频在共享视频 
I've been trying to add metadata on an .mp4 video that is stored on an Azure Blob. I want to add opengraph tags and when I try and enter them in, I get a message that says, "The name: 'og:type' should be a valid C# identifier." I'm not a C# developer and haven't been able to find documentation that shows valid C# identifiers for meta tags. Any help would be appreciated, thanks!
Edit: I must've misunderstood the purpose of the Metadata section as I thought it would add HTML meta tags to the document on the video's page. Do you know if this is possible? For example I want to share the link to this video on a social media site and would like to try and get this video to be able to play inline or have at least an image preview when sharing the link to the video

发布评论
评论(2)
将元数据添加到现有的Azure Blobs中,只有在您给出有效输入的情况下才能起作用。
请 Note :
如 @stefan Wuebbe ,您可以通过遵循 文档来找到C#命名规则和约定:
c#标识符名称| Microsoft Docs
我在环境中尝试过,如果我使用colon(:)在元数据中间,则会出现相同的错误。
要解决错误,使用 unscore(_) 而不是 colon(:: ) 喜欢下图:
.com/en-us/rest/api/storageservices/sett-and-retrieving-properties and-metadata for-bolb-blob-resources#subheading1“ rel =” nofollow noreferrer“ (REST API) - Azure存储|微软文档
Adding metadata to existing Azure blobs will only work if you give valid input.
Please note that:
As mentioned by @Stefan Wuebbe , you can find C# naming rules and conventions by following this document:
C# identifier names | Microsoft Docs
I tried in my environment and got the same error if I use colon (:) in the middle of metadata name.
To resolve the error, make use of underscore (_) instead of colon (:) like below:
To know more in detail, please refer below link:
Setting and retrieving properties and metadata for Blob service resources (REST API) - Azure Storage | Microsoft Docs
让我在AWS DataSync复制的上下文中回答MS Azure Blob存储,以便在Stackoverflow上查找目的,因为我遇到了完全相同的错误,该错误由DataSync API返回。它可能只是从Azure API本身传递了该消息。
在上面的用例中,我得到了:
因为元数据不是X-amz--或没有单个单词作为该header的后缀前缀。
示例:
参考: https://docs.aws.amazon.com/amazons3/latest/userguide/usingmetadata.html
Let me answer in the context of AWS DataSync copy onto MS Azure Blob Storage, for lookup purposes on StackOverflow, as I got the exact same error, returned by DataSync API. It probably just passed on that message from Azure API itself.
In my use-case above, I got:
because the metadata didn't start with x-amz-, or didn't have a single word as suffix to that header prefix.
Example:
Reference: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingMetadata.html