diff --git a/flutter_cache_manager/lib/src/compat/file_service_compat.dart b/flutter_cache_manager/lib/src/compat/file_service_compat.dart index bbd7a6ff..0df201e1 100644 --- a/flutter_cache_manager/lib/src/compat/file_service_compat.dart +++ b/flutter_cache_manager/lib/src/compat/file_service_compat.dart @@ -63,15 +63,13 @@ class CompatFileServiceGetResponse implements FileServiceResponse { @override String get fileExtension { - // var fileExtension = ''; - // final contentTypeHeader = _header(HttpHeaders.contentTypeHeader); - // if (contentTypeHeader != null) { - // final contentType = ContentType.parse(contentTypeHeader); - // fileExtension = contentType.fileExtension; - // } - // return fileExtension; - - return '.jpeg'; + var fileExtension = ''; + final contentTypeHeader = _header(HttpHeaders.contentTypeHeader); + if (contentTypeHeader != null) { + final contentType = ContentType.parse(contentTypeHeader); + fileExtension = contentType.fileExtension; + } + return fileExtension; } @override