Skip to main content

Apps can now open Shopify’s file picker with the Intents API

Apps can now open Shopify’s native file picker with the Intents API. This lets your app prompt merchants to choose files from their Shopify file library without building a custom picker or sending them through a separate flow.

With a single API call, your app can open the file picker, optionally filter by media type, enable multiple selection, and preselect files. When the merchant finishes selecting files, your app receives the selected file IDs as an array in response.data.ids.

New intent

The following intent is now available:

  • pick:shopify/File

How it works

Invoke the intent from App Home or a UI extension:

const activity = await shopify.intents.invoke('pick:shopify/File');

const response = await activity.complete;

if (response.code === 'ok') {
console.log('Selected file IDs:', response.data.ids);
// response.data.ids is an array of selected file IDs
}

Learn more in the App Home (iframe) Intents docs and App Home (UI extension) Intents docs.

Was this section helpful?