CreateFile
Uploads or registers a file asset in Shopify using an external URL or a staged upload reference.
Input
| Name | Type | Description |
| OriginalSource | String | The external or staged upload URL for the file. For images, this can be a direct external URL; for other file types, a staged upload URL is required. |
| FileName | String | Specifies the desired filename for the created file. If not provided, the filename from the original source will be used automatically. |
| Description | String | An optional text description or alternative text used to describe the file's contents for accessibility and SEO purposes. |
| ContentType | String | The MIME type of the file, such as 'image/png' or 'application/pdf'. If not provided, Shopify will attempt to detect the content type automatically during upload. |
| DuplicateResolutionMode | String | Defines how Shopify should handle file creation if another file with the same name already exists.
The allowed values are APPEND_UUID, RAISE_ERROR, REPLACE. |
Result Set Columns
| Name | Type | Description |
| Success | Boolean | Indicates whether the file creation operation completed successfully. |
| Details | String | Provides additional diagnostic information or context about the file creation process. |
| Id | String | The unique identifier assigned to the newly created file record. |
| Status | String | The current status of the file after processing, such as 'UPLOADED', 'PROCESSING', or 'FAILED'. |