Repository navigation
Remove read-only ImageAsset fields from upload_image_asset examples - #577
Open
pattersonlois wants to merge 3 commits into
Open
pattersonlois wants to merge 3 commits into
pattersonlois wants to merge 3 commits into
Conversation
pattersonlois
requested review from
Raibaz and
bobhancockg
and removed request for
a team
November 17, 2026 14:03
dorasun
reviewed
Nov 18, 2026
bobhancockg
approved these changes
Nov 19, 2026
Raibaz
approved these changes
Nov 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In
AssetService.MutateAssets,ImageAsset.datais the onlyImageAssetfield that you can set when you create an image asset. Thefile_size,mime_type, andfull_sizefields (height_pixels,width_pixels, andurl) are read-only, and the API ignores any values set for them in acreateoperation.The Java, PHP, and Perl
upload_image_assetexamples already send onlynameandimage_asset.data. This change aligns this example with them.examples/misc/upload_image_asset.rb: Removes thefile_size,mime_type, andfull_sizeassignments, and updatesopen(url) { |f| f.read }toURI.open(url, &:read)to download the image.