AzureFileCopy以blob格式生成应用程序/八位字节流文件

问题描述 投票:1回答:1

我正在使用AzureFileCopy任务将文件复制到blob以获取cdn,但我的所有新文件默认最终都是application / octet-stream。有什么办法可以改变吗?

steps:
- task: AzureFileCopy@1
  displayName: ' File Copy - blob'
  inputs:
    SourcePath: '$(System.DefaultWorkingDirectory)/xxxxxx/blob'
    azureSubscription: 'xxxxxx'
    Destination: AzureBlob
    storage: xxxxxx
    ContainerName: cdn
azure-storage-blobs azure-pipelines-build-task
1个回答
0
投票

默认情况下,AzCopy将blob或文件的内容类型设置为application / octet-stream。您可以通过显式指定此选项的值来设置所有blob或文件的内容类型。

如果指定此选项而没有值,则AzCopy会根据文件扩展名设置每个blob或文件的内容类型。您可以参考https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy#setcontenttypecontent-type了解更多详情。

© www.soinside.com 2019 - 2024. All rights reserved.