Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not save brand API "brand_icon_encoded_data" #5

Open
koria opened this issue Nov 5, 2020 · 0 comments
Open

Could not save brand API "brand_icon_encoded_data" #5

koria opened this issue Nov 5, 2020 · 0 comments

Comments

@koria
Copy link

koria commented Nov 5, 2020

Can't add brand icon with API call

when i send post or put with "brand_icon_encoded_data" like this

"base64_encoded_data": "base64 encoded image here",
"name": "capture.svg",
"type": "image/svg+xml"

Response:

"message": "Could not save brand.",
"parameters": [
"The image content must be valid base64 encoded data."
]

POST: /V1/brands

"brand": {
	"brand_name": "Capture",
	"url_key": "capture",
	"is_featured": 0,
	"enabled": 1,
	"store_id": 0,
	"brand_icon_encoded_data": {
	"base64_encoded_data": "put here base64 encoded data",
	"name": "capture.svg",
	"type": "image/svg+xml"
	}
}

Base64 example:

PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI0LjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiCgkgdmlld0JveD0iMCAwIDM4MCAxMTgiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDM4MCAxMTg7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDpub25lO30KCS5zdDF7ZmlsbDojRkZGRkZGO30KPC9zdHls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LjQsMi44Yy02LjgsMS4zLTEzLjQsMi0yMS41LDJjLTEzLjgsMC0yNy4yLTYuNS0yNy4yLTI4LjhWNDguNWMwLTE3LjIsOS41LTI4LjEsMjYuNi0yOC4xCgkJCQljMTcuNSwwLDI2LjQsMTEsMjYuNCwyOC4xVjU1QzM3NS4xLDU2LjYsMzc0LjIsNTcuNywzNzIuOCw1Ny43eiBNMzY0LjQsNDguNWMwLTEzLjYtNS4yLTE4LjgtMTUuNy0xOC44CgkJCQljLTEwLjMsMC0xNi4xLDUuOS0xNi4xLDE4Ljh2MS4xaDMxLjhWNDguNXoiLz4KCQk8L2c+CgkJPHBhdGggY2xhc3M9InN0MSIgZD0iTTMyNS45LDI5LjhjMCwwLDE3LjMtMi4yLDI4LjUsMC42Yy0yLTAuNS02LjMsNC04LjIsMy45Yy0xOC0xLTIzLjUsMi40LTIzLjUsMi40UzMyMC42LDM3LjEsMzI1LjksMjkuOHoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant