milesau
milesau

Reputation: 115

Flutter app uploading image to Firebase Storage with Shopify App Counterpart - Image: Media processing failed

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.

enter image description here

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:

base64

jpeg

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

Answers (1)

milesau
milesau

Reputation: 115

I reached out to shopify support chat, query strings in the url are not supported.

Upvotes: 0

Related Questions