I'm building a private app that will have the ability to create products on the store. I understand that using GraphQL, I have to provide a URL to the product as opposed to being able to provide a base64 encoded "attachment" if using REST. I've seen it requested (and confirmed to be being worked on) that we be able to provide an attachment instead of a URL when using GraphQL, so that's not my question... my question is, is there a way to upload to the CDN instead of finding image hosting somewhere else, to then provide that URL for the product image? I rather not have my product images living somewhere else for the mere purpose of passing it along to the product during creation.
Solved! Go to the solution
This is an accepted solution.
You can use our Admin GraphQL API's StagedUploadTargetGenerate mutation to initialize a storage bucket with your image file, which returns to you a src URL you can use to add the image(s) to resources:
Hope that helps, it definitely appears to solve the issue of having to upload to another service. Let me know if you have any questions, or if I've misunderstood what you're looking for.
The answer above has been updated for accuracy on July 3rd, 2019