Foxy.io

Add a file upload option to Foxy.io products

Configure Uploadcare Widget

  1. You need an Uploadcare account.
  2. You need to have a project in Uploadcare.
  3. Configure your widget here. You can find documentation on widget settings here.

Add Uploadcare Widget to Foxy Product Form

  1. Copy/paste the script snippet from your Uploadcare widget settings. The snippet will look similar to the following:

    <script>UPLOADCARE_PUBLIC_KEY = "CHANGE_TO_YOUR_PUBLIC_KEY";</script>
    <script charset="utf-8" src="//ucarecdn.com/widget/2.9.0/uploadcare/uploadcare.full.min.js"></script>
    	
  2. In your website (or the page where your Foxy product will reside), paste the snippet right before the closing HEAD tag.
  3. Go back to your Uploadcare widget settings and copy the form input HTML.
  4. Paste the form input HTML into your Foxy product form.
  5. Add the "name" parameter to the file input HTML (ie: name="uploads"). The name value can be changed to anything you want. Be sure to provide your store subdomain. Your HTML should look similar to the following:

    <form action="https://YOUR-SUBDOMAIN.foxycart.com/cart" method="post" accept-charset="utf-8"> 
      <input type="hidden" name="name" value="My Product" /> 
      <input type="hidden" name="price" value="10" /> 
      <input type="hidden" role="uploadcare-uploader" data-multiple="true" name="uploads" required /> 
      <input type="submit" value="Add To Cart" class="submit" /> 
    </form>