سؤال

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