I need to convert approx 250k images from having a content type of application/octetstream to image/jpg

is there a powershell script I can utilise to do this or some sort of command code?

有帮助吗?

解决方案 2

I don't think Windows Azure PowerShell Cmdlets has a readymade Cmdlet to do that. If you're open to use 3rd party product, you can try Cerebrata's Azure Management Cmdlets. It has a Set-BlobProperties cmdlet using which you can set the content type.

You can also do it through code as well. Essentially what you would do is fetch blobs from the blob container using ListBlobs or ListBlobsSegmented method and then iterate over these blobs and update the blob's properties via SetProperties method of CloudBlockBlob.

其他提示

There is a script available in Windows Azure Script Center repository, where you can use to batch change the content type of your files.

They provide also a video on how to use it.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top