Make more explicit error message for large thumbnails
This commit is contained in:
		
							parent
							
								
									0c81a2f89e
								
							
						
					
					
						commit
						be9ff04ee8
					
				@ -762,7 +762,10 @@ class CollectionOps:
 | 
			
		||||
                flush=True,
 | 
			
		||||
            )
 | 
			
		||||
            await self.storage_ops.delete_file_object(org, thumbnail_file)
 | 
			
		||||
            raise HTTPException(status_code=400, detail="upload_failed")
 | 
			
		||||
            raise HTTPException(
 | 
			
		||||
                status_code=400,
 | 
			
		||||
                detail="Upload failed: maxiumum thumbnail size (2 MB) exceeded",
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
        if coll.thumbnail:
 | 
			
		||||
            if not await self.storage_ops.delete_file_object(org, coll.thumbnail):
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user