Hey, I’d like to upload my custom shopify app, it’s main goal is fetching the products and then generating XML files, the issue is, that I’m unable to save the generated xml file in a public/accessable folder in the shopify store( so its accessable via link/url), and the other issue is, that I’m running on a development linkn (as I test the app), so I’m also being blocked by cors policy as I attend to save the file somewhere. my idea was to upload the app to the test site, not from the terminal via development link and try if that fixes the issue.
I’m including in the attachment the code, the way I’m trying to save the XML via post method.
Thanks for any help!
Topic summary
-
Custom Shopify app aims to fetch products and generate XML files that must be publicly accessible via a URL.
-
Problems encountered: cannot save the generated XML to a public/accessible folder within the Shopify store. While testing on a development link, attempts to save the file elsewhere are blocked by CORS. CORS (Cross-Origin Resource Sharing) prevents cross-origin requests without proper permissions/headers.
-
Proposed next step: install/upload the app to a test site (instead of running via a development link) to see if this resolves the storage and CORS issues. A code attachment (POST method) is provided showing how the XML save is attempted.
-
Status: Unresolved. Seeking advice on where to store a publicly accessible file in Shopify and how to handle CORS during development.