Skip to content

Commit

Permalink
Update file_service_compat.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
myafer committed Dec 4, 2024
1 parent 4e03901 commit 74e71ca
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions flutter_cache_manager/lib/src/compat/file_service_compat.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 74e71ca

Please sign in to comment.