Staged Media Upload Target
Information about a staged upload target, which should be used to send a request to upload the file.
For more information on the upload process, refer to Upload media to Shopify.
Anchor to FieldsFields
- Anchor to parametersparameters•[Staged
Upload Parameter!]! non-null Parameters needed to authenticate a request to upload the file.
- Anchor to resourceUrlresource•URL
Url The URL to be passed as
in CreateMediaInput and FileCreateInput for the productCreateMedia and fileCreate mutations.
- •URL
The URL to use when sending an request to upload the file. Should be used in conjunction with the parameters field.
Anchor to MutationsMutations
- •mutation
Creates staged upload targets for file uploads such as images, videos, and 3D models.
Use the
mutation instead of direct file creation mutations when:
- Uploading large files: Files over a few MB benefit from staged uploads for better reliability
- Uploading media files: Videos, 3D models, and high-resolution images
- Bulk importing: CSV files, product catalogs, or other bulk data
- Using external file sources: When files are stored remotely and need to be transferred to Shopify
The
mutation is the first step in Shopify's secure two-step upload process:
Step 1: Create staged upload targets (this mutation)
- Generate secure, temporary upload URLs for your files.
- Receive authentication parameters for the upload.
Step 2: Upload files and create assets
- Upload your files directly to the provided URLs using the authentication parameters.
- Use the returned
as the
in subsequent mutations like
.
This approach provides better performance for large files, handles network interruptions gracefully, and ensures secure file transfers to Shopify's storage infrastructure.
After creating staged upload targets, complete the process by:
- Uploading files: Send your files to the returned
url
using the providedparameters
for authentication - Creating file assets: Use the
as the
in mutations such as:
Learn more about uploading media to Shopify.