How to get a customer's uploaded file from a Shopify order
Updated Dec 2, 2026 Verified Admin API 2026-04 Any plan 4 min read
Short answer: Open the order and look for the upload_reference value, which holds the file's URL. Product page uploads sit on the line item and cart or checkout uploads sit on the order. Developers can read the same values with the Admin API, or load the file in Shopify Flow.
Where is the uploaded file on a Shopify order?
Every upload is saved to your own Shopify Files. What reaches the order is a reference to that file, not the file itself. The reference arrives in one of two places, depending on where the customer uploaded.
- Product page uploads become a line-item property named
Uploaded filethat holds the file URL, plus a hidden property named_upload_reference_idsthat holds the Shopify File ID. They show on the line item the customer was buying. - Cart page and checkout uploads become a cart attribute named
upload_reference(the URL) plusupload_reference_ids(the File ID). Shopify copies cart attributes onto the order when it is created.
If you changed the attribute name in the block settings, look for your name instead. If the block hides the property from shoppers, the property name starts with an underscore, for example _Uploaded file. It stays on the order.
In the admin, open the order. Upload Native’s own setup guide points to the Additional details area of the order page for cart attributes, and to the line item for the product page property. The file itself is also listed under Content, then Files.
How do I open the file from the order?
The URL is a plain link to the file in Shopify Files. Copy it into a browser tab to view or download it. If the order has several files, the value is a JSON array of URLs rather than a single link, so you will see square brackets and quotes around the addresses.
For a handful of orders this is all you need. For a print shop or an engraving workflow where every order has a file, you will want to read the values automatically, which the next sections cover.
How do I read the upload with the Admin API?
This query returns the order name, the cart attributes, and the properties on up to 50 line items. It needs the read_orders scope.
query OrderUploads($id: ID!) {
order(id: $id) {
name
customAttributes {
key
value
}
lineItems(first: 50) {
nodes {
title
customAttributes {
key
value
}
}
}
}
}
Pass the order’s global ID as the variable, for example {"id": "gid://shopify/Order/1234567890"}. In the result, look for entries whose key is upload_reference or upload_reference_ids in the order’s customAttributes, and Uploaded file or _upload_reference_ids in each line item’s customAttributes.
Both fields return strings. When a block allows several files, the string is a JSON array, so run it through JSON.parse before using it.
How do I get the file’s details from its ID?
The File ID, which looks like gid://shopify/GenericFile/123, lets you ask Shopify about the stored file. This query needs the read_files scope.
query UploadedFile($id: ID!) {
node(id: $id) {
... on GenericFile {
url
mimeType
originalFileSize
fileStatus
}
... on MediaImage {
mimeType
image {
url
width
height
}
}
}
}
PDFs and other documents come back as a GenericFile. Pictures come back as a MediaImage, where the URL sits under image. Check fileStatus before you link to the file, since a file that has only just been uploaded can still be processing.
Both queries were checked against Admin API 2026-04. If you use a later version, check the field names again before you ship.
Can Shopify Flow load the file for me?
Yes. The Upload Native “Load file details” action takes a File ID or an exact filename and returns the filename, MIME type, size in bytes, and the original URL. For images it also returns small, medium and large versions. You can place it in any workflow, then pass the URL to an email step or another app. The Flow guide walks through a full example.
What should I check when the value is missing?
- Confirm the customer uploaded before they paid. The value is set on the cart, so a file added after the order was created is not carried over.
- On the product page, check the block’s “Where to attach the file” setting. Auto uses a line-item property there.
- Check whether you set a custom attribute name. The default is
upload_reference, and extra blocks on the same page useupload_reference_2and so on. - Look at the app’s Uploads list in the admin. If the file is listed there but missing from the order, the cart value was probably cleared or overwritten by another app or theme script.