# How to show the file upload only on flagged products

> Switch on Only show for flagged products in the block, then set the Show file upload metafield to True on each product that needs a file. The upload then appears on flagged product pages, and on the cart and at checkout whenever a flagged product is in the cart.

## Why show the upload only on some products?

A store rarely needs a file for everything. If you sell plain stock next to engraved or printed items, an upload box on every product page confuses customers and invites files nobody will use. Per-product visibility keeps the field where it belongs and removes it everywhere else.

The setting is off by default, so nothing changes until you turn it on.

## How does the flag work?

There are two parts, and both are needed.

1. **A switch on the block.** "Only show for flagged products" tells the block to render only when a product is flagged.
2. **A flag on each product.** The "Show file upload" metafield, set to True, marks a product as one that needs a file.

If the switch is on and a product has no flag, the block stays hidden for that product. An unset flag counts as hidden by design.

## How do I flag a product?

1. In your Shopify admin, open Products and pick a product.
2. Scroll to the Metafields card and click View all.
3. Find "Show file upload" and set it to True.
4. Save, and repeat for every product that needs a file.

The metafield is owned by the app and declared for you, so you do not need to create a definition. It is unpinned by default, which is why it sits behind View all.

## How do I turn it on in the theme block?

1. Open the theme editor and select the File upload block.
2. Under Visibility, tick "Only show for flagged products".
3. Save.

The block always stays visible inside the theme editor so you can keep configuring it. On the storefront it follows the rules below.

- **Product page:** it shows when the current product is flagged.
- **Cart page and cart drawer:** it shows when any item in the cart is flagged.

## How do I turn it on at checkout on Plus?

Checkout uploads need Shopify Plus. In your Shopify admin, go to Settings, then Checkout, then Customize. Select the Upload a file block and set "Only show for flagged products" to True. Save.

The checkout block follows the same logic as the cart page: it appears when a flagged product is in the cart. If you also made the upload required, the requirement applies only when a flagged product is in the cart. A hidden upload field never blocks checkout.

## How does this combine with the Show to setting?

"Show to" decides which customers see the uploader, and it combines with per-product visibility.

- **Everyone** is the default and changes nothing.
- **B2B (company) customers only** shows the block just to logged-in company buyers.
- **Retail customers only** shows it to everyone else.

Turn on both and the uploader appears only when the product is flagged and the customer matches. This suits a wholesale-only artwork step or a direct-to-consumer personalization offer.

## How do I check it works?

- Visit a flagged product and an unflagged product in a normal browser tab, not the theme editor.
- Add the flagged product to the cart and open the cart page, then add only the unflagged product and compare.
- If you use the Show to setting, test logged in as a company buyer and as a retail customer.
- On Plus, run a test checkout with a flagged item and again with an unflagged one.

If the block is missing where you expect it, check the product flag first, then the switch on the block, then the audience setting. Those three account for nearly every case. The [product page guide](/shopify-product-page-file-upload/) has the full setup if the block is not yet on your theme.

## FAQ

### Why is the block still visible in my theme editor?

The editor always shows the block so you can select and configure it. Check the live storefront in a normal tab to see the real behavior.

### Does it work for variants?

The flag is a product setting, so every variant of a flagged product shows the uploader. There is no separate flag per variant.

### What happens when the field is hidden and the upload is required?

Nothing blocks the buyer. A hidden upload field never stops checkout, so the requirement applies only when a flagged product is in the cart.

### Is the metafield something I have to create?

No. The app declares it for you. You only find it on each product page and set it to True.

Canonical URL: https://uploadnative.app/guides/show-upload-on-flagged-products/
