Reputation: 115
I'm trying to add products with photos from a url, and I'm getting a media processing error. The photos work everywhere else I use them, but they don't seem to get processed by Shopify.
I've tried uploading as a base64 file as well and verified that the base64 file isn't broken here: hhttps://codebeautify.org/base64-to-image-converter
Here's the images i'm testing with:
code I'm using to upload images:
// upload compressed photo
var compressedJpeg = await FlutterImageCompress.compressWithList(
item.photoByteData.buffer.asUint8List(),
format: CompressFormat.jpeg,
);
uploadTask = photoStorageReference.putData(
Uint8List.fromList(compressedJpeg),
StorageMetadata(contentType: 'image/jpeg'),
);
await uploadTask.onComplete;
// upload base64 image
final base64Path =
join((await getTemporaryDirectory()).path, 'base64_original');
File base64File = File(base64Path);
base64File.writeAsStringSync(base64Encode(compressedJpeg));
uploadTask = base64StorageReference.putFile(
base64File,
StorageMetadata(contentType: 'image/jpeg'),
);
await uploadTask.onComplete;
Has anyone else experienced this issue before?
Upvotes: 1
Views: 256
Reputation: 115
I reached out to shopify support chat, query strings in the url are not supported.
Upvotes: 0