mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-11-04 07:01:31 +08:00 
			
		
		
		
	better fallback for resolving filenames of binary attachments
This commit is contained in:
		
							parent
							
								
									58fa0832f6
								
							
						
					
					
						commit
						be7ac74235
					
				@ -205,6 +205,14 @@ function formatDownloadTitle(filename, type, mime) {
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (mime === 'application/octet-stream') {
 | 
			
		||||
            // we didn't find any good guess for this one, it will be better to just return
 | 
			
		||||
            // the current name without fake extension. It's possible that the title still preserves to correct
 | 
			
		||||
            // extension too
 | 
			
		||||
 | 
			
		||||
            return filename;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return filename + '.' + extensions[0];
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user