diff --git a/packages/cli-kit/src/public/node/themes/api.ts b/packages/cli-kit/src/public/node/themes/api.ts index 23966667812..706a9eae093 100644 --- a/packages/cli-kit/src/public/node/themes/api.ts +++ b/packages/cli-kit/src/public/node/themes/api.ts @@ -119,24 +119,22 @@ export async function bulkUploadThemeAssets( function prepareFilesForUpload(assets: AssetParams[]): OnlineStoreThemeFilesUpsertFileInput[] { return assets.map((asset) => { - if (asset.value) { + if (asset.attachment) { return { filename: asset.key, body: { - type: 'TEXT' as const, - value: asset.value, + type: 'BASE64' as const, + value: asset.attachment, }, } - } else if (asset.attachment) { + } else { return { filename: asset.key, body: { - type: 'BASE64' as const, - value: asset.attachment, + type: 'TEXT' as const, + value: asset.value ?? '', }, } - } else { - unexpectedGraphQLError('Asset must have a value or attachment') } }) }