|
||||||
Hi Meir,
I work with Ernie and will assist you. I reproduced this behavior of CANNOT_MODIFY_ASSET_NAME when uploading duplicate image with a modification in UploadImageAsset.java to upload the image with a name the second time around, the error response didn't show which image was the duplicate. I raised with my team this request for the error message to show which resource name is the duplicate. Upon review we may add this functionality. You may monitor our blog for an update.
In the meantime, you can pull an asset report and filter for dimensions and size and other attributes of the image you are trying to upload and then if there is one match you got the resource name.
SELECT asset.id, asset.image_asset.file_size, asset.image_asset.full_size.height_pixels, asset.image_asset.full_size.url, asset.image_asset.full_size.width_pixels, asset.image_asset.mime_type, asset.name, asset.resource_name FROM asset WHERE asset.image_asset.file_size = 0 AND asset.image_asset.full_size.height_pixels = 0 AND asset.image_asset.full_size.url = '0' AND asset.image_asset.full_size.width_pixels = 0 AND asset.image_asset.mime_type = 'IMAGE_GIF'
Reminder: Share your feedback about the Google Ads (AdWords) API! Take the 2021 Google Ads API and AdWords API Annual Survey
Regards,
|
||||||
|
||||||
|
||||||
Hello Everyone,
Thanks for the following up on this thread.
Currently, a feature request has been raised for this; however, please note that there is no guarantee if this will be supported in the API soon. That said, please continue to follow our blog for updates.
Regards,
|
||||||
|
||||||
Hi Luciano,
Right now, parsing the error message is the way to handle this error. I'll work with the team to try and introduce a better way to expose this error.
Cheers
Anash
When doing the calls to this API, we don’t receive the error anymore and instead, the existing asset id is automatically reused when we upload the same image again.
|
||||||
|
||||||