directus-dart
directus-dart copied to clipboard
while uploadFile(filePath) it gets uploaded but some parsing error
Getting this error ⬇️
type 'String' is not a subtype of type 'int?' in type cast
while uploading file via 'uploadFile' method but it successfully uploads but throws error while parsing the response
mostly occurring from the filesize field type as the server sends it as a String? but package defines it as int?
https://github.com/apstanisic/directus-dart/blob/ec87f59f5260470a06f9672dddc1baf962a8b85d/lib/src/modules/files/directus_file.dart#L46
It should return int for file size based on Directus docs
I do not want to add another dependency for mime type, it's out of the scope of this package. It should be up to the user to parse them.
Sure, check any issue with "enhancement" or "bug" label, and create a PR
Should be fixed, please try latest version. Reopen if exception still exists