toJson method
Get file info as JSON
Implementation
Future<Map<String, dynamic>> toJson() async {
return {
'filename': filename,
'contentType': contentType,
'extension': extension,
'size': await length,
'isAudio': isAudio,
'isVideo': isVideo,
'isImage': isImage,
};
}