appwrite / sdk-for-flutter

[READ-ONLY] Official Appwrite Flutter SDK πŸ’™

Home Page:https://appwrite.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ› Bug Report: Storage getFilePreview doesn't work with the new enums

Andree98 opened this issue Β· comments

πŸ‘Ÿ Reproduction steps

Using storage getFilePreview(output: ImageFormat.webp) throws an error and the request doesn't go through.

stacktrace:

I/flutter (11114): type 'ImageFormat' is not a subtype of type 'Iterable<dynamic>'
I/flutter (11114): #0      _Uri._makeQueryFromParametersDefault.<anonymous closure> (dart:core/uri.dart:2382:18)
I/flutter (11114): #1      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:633:13)
I/flutter (11114): #2      _Uri._makeQueryFromParametersDefault (dart:core/uri.dart:2378:21)
I/flutter (11114): #3      _Uri._makeQueryFromParameters (dart:core-patch/uri_patch.dart:85:12)
I/flutter (11114): #4      _Uri._makeQuery (dart:core/uri.dart:2353:12)
I/flutter (11114): #5      new _Uri (dart:core/uri.dart:1654:13)
I/flutter (11114): #6      ClientMixin.prepareRequest (package:appwrite/src/client_mixin.dart:52:13)
I/flutter (11114): #7      ClientIO.call (package:appwrite/src/client_io.dart:370:32)
I/flutter (11114): #8      Storage.getFilePreview (package:appwrite/services/storage.dart:217:30)

πŸ‘ Expected behavior

The request should go through

πŸ‘Ž Actual Behavior

The request doesn't go through because of the new ImageFormat enum

🎲 Appwrite version

Version 2.0.x

πŸ’» Operating system

Linux

🧱 Your Environment

No response

πŸ‘€ Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏒 Have you read the Code of Conduct?