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

Change the Attachment type from string to []byte. This allows images to be created with attachments #242

Closed
wants to merge 1 commit into from

Conversation

dmateus
Copy link

@dmateus dmateus commented Oct 30, 2023

At the moment, creating images with attachments doesn't work. The attachment needs to be a []byte

@codecov
Copy link

codecov bot commented Oct 30, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (26d463b) 100.00% compared to head (0d63375) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #242   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           47        47           
  Lines         2094      2094           
=========================================
  Hits          2094      2094           
Files Coverage Δ
image.go 100.00% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@oliver006
Copy link
Collaborator

From the docs (*) it looks like Attachment needs to be base64 encoded. Did you try that?

(*) https://shopify.dev/docs/api/admin-rest/2023-10/resources/product-image

@dmateus
Copy link
Author

dmateus commented Nov 3, 2023

You're correct!

@dmateus dmateus closed this Nov 3, 2023
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

Successfully merging this pull request may close these issues.

2 participants