0
votes

I am using azcopy 8.1 to upload .jpg files to azure blob storage but on upload the content type is set to application/octet-stream instead of image/jpeg.

Should it not recognized it from AzCopyConfig.json. Is this a bug?

& $azcopyLocation /Source:$sourcePath /Dest:$deploymentPath /destkey:$destinationKey /Pattern:"*.jpg" /S /Y
1

1 Answers

1
votes

See /SetContentType:"content-type".

AzCopy sets the content type for a blob or file to application/octet-stream by default. You can set the content type for all blobs or files by explicitly specifying a value for this option.

If you specify this option without a value, then AzCopy sets each blob or file's content type according to its file extension.

So simply append /SetContentType to the command should work.