CreateFile
Creates file assets using an external URL or for files that were previously uploaded using the stagedUploadsCreate mutation.
Note: requires write_files access scope, write_themes access scope or write_images access scope.
EXEC CreateFile OriginalSource='https://www.cdata.com/ui/img/og-img-cdata-logo.png'
EXEC CreateFile OriginalSource='https://www.cdata.com/ui/img/og-img-cdata-logo.png', FileName='cdata-logo.png', Description='cdata-logo-new', ContentType='IMAGE', DuplicateResolutionMode='REPLACE'
Input
Name | Type | Description |
OriginalSource | String | An external URL (for images only) or a staged upload URL. |
FileName | String | When provided, the file will be created with the given filename, otherwise the filename in the originalSource will be used. |
Description | String | The alternative text description of the file. |
ContentType | String | The file content type. If omitted, then Shopify will attempt to determine the content type during file processing. |
DuplicateResolutionMode | String | How to handle if filename is already in use.
The allowed values are APPEND_UUID, RAISE_ERROR, REPLACE. |
Result Set Columns
Name | Type | Description |
Success | Boolean | Indicates whether or not the operation executed successfully. |
Details | String | Any extra details on the operation's execution. |
Id | String | A globally-unique ID. |
Status | String | The status of the file. |