The blob type is invalid for this operation when using AzCopy sync

AJ Enns 1 Reputation point Microsoft Employee
2020-06-05T13:11:46.993+00:00

I have a WordPress site that is using the Microsoft Azure Storage for WordPress plugin which stores media files in Azure Storage. The plugin uploads to azure when the media is added to WordPress. After the file is added, I then run ShortPixel optimization to optimize the image. I am trying to run azcopy sync after the optimization happens to upload the new optimized file to Azure Storage. On every optimized image I get:

UPLOADFAILED: <path and file> : 409 : 409 The blob type is invalid for this operation.. When Uploading blob.

I am using --delete-destination=false as a parameter with my azcopy sync command because I have many other images in my storage account which I don't want to delete. How can I force an overwrite, or why is the blob type different if the only thing to change is the size?

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,871 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Sumarigo-MSFT 44,906 Reputation points Microsoft Employee
    2020-06-05T14:09:33.55+00:00

    @ Agustis Can you try to rename the file in lowercase and try to upload .Let me know the status

    Based on the error message you can refer to The blob type is invalid for this operation.
    You can either use fiddler if the failure is repro-able to capture the traces or try enabling Storage Analytics logs(https://video2.skills-academy.com/en-us/azure/storage/storage-analytics)

    Error 409 respons eis expected in some cases. Ex: When the container already exists with the name.

    Kindly let us know if the above helps or you need further assistance on this issue.

    Hope this helps!

    ------------------------------------------------------------------------------------------------------------

    Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.

    1 person found this answer helpful.

  2. Manu Philip 17,186 Reputation points MVP
    2020-06-05T14:01:13.213+00:00

    Hello @AJ Enns ,

    The sync command compares file names and last modified timestamps. That means, Azure need the exact images at both places to validate this step. In your case, you are trying to copy an optimized image to the target location. I think, you need to add one more parameter to check the content as below

    --check-md5=NoCheck

    Please mark as "Accept the answer" if the above steps helps you. Others with similar issues can also follow the solution as per your suggestion

    Regards,

    Manu