mirror of
				https://github.com/AppFlowy-IO/AppFlowy.git
				synced 2025-11-04 12:03:28 +00:00 
			
		
		
		
	* feat: add tooltip for maximum image size * feat: add maximum upload image size tooltip * feat: limit image size to 10MB * fix: disable copy link option for cloud image * fix: disable copy link option for cloud image * feat: use regex to match the appflowy.cloud image
		
			
				
	
	
		
			12 lines
		
	
	
		
			200 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			200 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
import 'dart:io';
 | 
						|
 | 
						|
extension FileSizeExtension on String {
 | 
						|
  int? get fileSize {
 | 
						|
    final file = File(this);
 | 
						|
    if (file.existsSync()) {
 | 
						|
      return file.lengthSync();
 | 
						|
    }
 | 
						|
    return null;
 | 
						|
  }
 | 
						|
}
 |