<p>You will not be able to upload an asset into a line item at Commerce 1 or 2.</p>

<p>You only 2 options are </p>

<p>1) Upload the asset to an order custom field(s). Submit a new question with your code if this is not working for you.</p>

<p>2) Upload the asset anywhere else, (including optionally the order), and then put the URL of the asset into the line items <code>options</code> data. See <a href="https://docs.craftcms.com/commerce/v2/adding-to-and-updating-the-cart.html#line-item-options-and-notes" rel="nofollow noreferrer">https://docs.craftcms.com/commerce/v2/adding-to-and-updating-the-cart.html#line-item-options-and-notes</a></p>

CC BY-SA 4.0
2018-04-25T14:10:58.813Z
2018-11-02T18:55:26.850Z
2018-11-02T18:55:26.850Z
Luke Holder
<p>Does anyone have any experience with adding file uploads to the add to cart forms on product pages within commerce? I've seen some examples of users <a href="https://craftcms.stackexchange.com/questions/15412/craft-commerce-upload-file-field-in-order?utm_medium=organic&amp;utm_source=google_rich_qa&amp;utm_campaign=google_rich_qa">attaching them to orders</a> (didn't work for me), but I'm looking to give customers the ability to attach per each line item.</p>

<plugin-craftcommerce>
Adding file uploads to commerce product line items?
# Adding file uploads to commerce product line items?

(Asked by: username_0 on 2018-04-25)

Does anyone have any experience with adding file uploads to the add to cart forms on product pages within commerce? I've seen some examples of users [attaching them to orders](https://craftcms.stackexchange.com/questions/15412/craft-commerce-upload-file-field-in-order?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa) (didn't work for me), but I'm looking to give customers the ability to attach per each line item.

**Tags:** plugin-craftcommerce

---

## 1 answers

### Answer by username_1 on 2018-04-25. Score: 1

You will not be able to upload an asset into a line item at Commerce 1 or 2.

You only 2 options are

1) Upload the asset to an order custom field(s). Submit a new question with your code if this is not working for you.

2) Upload the asset anywhere else, (including optionally the order), and then put the URL of the asset into the line items `options` data. See <https://docs.craftcms.com/commerce/v2/adding-to-and-updating-the-cart.html#line-item-options-and-notes>


---

