What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

tell me the endpoint or GraphQL to upload image files in a location File under Content

Solved

tell me the endpoint or GraphQL to upload image files in a location File under Content

heyuuuuu
Tourist
22 0 1

I'm trying to find out how to upload image files on Files under content using API or GraphQL.

 

I asked Claunde2 and it says;

To upload an image file to the Files section in Shopify using the REST Admin API, you would use the following endpoint:

POST /admin/api/2023-10/themes/<theme_id>/assets.json

 

But it didn't work.

Please tell me endpoint or GraphQL to do.

 

Thanks.

Screenshot 2024-01-17 22.38.48.png

Accepted Solution (1)

SBD_
Shopify Staff
1831 273 421

This is an accepted solution.

Hey @heyuuuuu 

 

You'll want to use the FileCreate mutation to add files here.

Scott | Developer Advocate @ Shopify 

View solution in original post

Reply 1 (1)

SBD_
Shopify Staff
1831 273 421

This is an accepted solution.

Hey @heyuuuuu 

 

You'll want to use the FileCreate mutation to add files here.

Scott | Developer Advocate @ Shopify