👔 File controller now return now when client request thumbnail but file has not
This commit is contained in:
		@@ -67,9 +67,16 @@ public class FileController(
 | 
			
		||||
 | 
			
		||||
        var fileName = string.IsNullOrWhiteSpace(file.StorageId) ? file.Id : file.StorageId;
 | 
			
		||||
 | 
			
		||||
        if (thumbnail && file.HasThumbnail)
 | 
			
		||||
            fileName += ".thumbnail";
 | 
			
		||||
        else if (!original && file.HasCompression)
 | 
			
		||||
        switch (thumbnail)
 | 
			
		||||
        {
 | 
			
		||||
            case true when file.HasThumbnail:
 | 
			
		||||
                fileName += ".thumbnail";
 | 
			
		||||
                break;
 | 
			
		||||
            case true when !file.HasThumbnail:
 | 
			
		||||
                return NotFound();
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        if (!original && file.HasCompression)
 | 
			
		||||
            fileName += ".compressed";
 | 
			
		||||
 | 
			
		||||
        if (dest.ImageProxy is not null && (file.MimeType?.StartsWith("image/") ?? false))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user