Post File To Shopify URL
I have produced an ASP.NET/MVC Web application where a user uploads a file, I then take that file and generate a new file based on server-side calculations. This new file is saved server-side.
I then need to post this new file to my client's Shopify URL via a Submit button (the end user will see this file and can then select 'Add to Cart').
I've been doing some looking around (e.g. 'post file to Shopify URL?') and the search results returned relate to either uploading files to your Shopify account through the Shopify admin console, or, a Shopify form post to external URL - this is not what I want - I need to post to Shopify from an external URL.
Is it possible to post a file to a Shopify URL? and if so, presumably this could be done using JSON? Can I use the Shopify API to do this? Presumably I'd need Shopify username / password credentials from the client to do this?
As you can tell(!) I'm a newbie to Shopify development so please forgive the seemingly straight-forward questions, but some guidance would be greatly appreciated, Thanks
You should be using Shopify to upload the file. In product.liquid you can do this, and the file is saved along with the order as a product's line item property. When the order is booked, you can listen for that event, then use API calls to get the order and the image the customer uploaded. At that point you manipulate the image or file as you wish.
You cannot POST a file to Shopify in the sense of making a product that then goes in the cart. What you could do is POST to your server, use the API to generate a new product with that file as part of the new product, then show that new product off to the customer. A lot of work in that pattern for sure!
Anyway, your question in the context of Shopify and how it works is too difficult to answer here with much more detail, especially without you saying what it is you are trying to actually do.
- → Function Undefined in Axios promise
- → React formatting dates with momentjs server side
- → AngularJS directive: "templateUrl" doesn't work while "template" works
- → how to add cannonical tag for ASPX .NET page
- → URL routing requires /Home/Page?page=1 instead of /Home/Page/1
- → ASP.NET routing w/ changing article name
- → NumericTextBox Loses Value using Html.TextBoxFor, not HTML
- → How to do Bundling of css & js files in Drupal
- → Does the fact that every page is reachable through www.example.com and www.example.com/index have any SEO impact?
- → How to add rich snippet in a website?
- → UrlRewriting does not work on server, but on localhost it works fine on asp.net?
- → Bootstrap Nav Collapse via Data Attributes Not Working