mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-27 11:18:14 +01:00 
			
		
		
		
	Fix:Static router for downloading single file library items #627
This commit is contained in:
		
							parent
							
								
									0ad7a98fc7
								
							
						
					
					
						commit
						6cfe583535
					
				@ -17,7 +17,9 @@ class StaticRouter {
 | 
			
		||||
      if (!item) return res.status(404).send('Item not found with id ' + req.params.id)
 | 
			
		||||
 | 
			
		||||
      var remainingPath = req.params['0']
 | 
			
		||||
      var fullPath = Path.join(item.path, remainingPath)
 | 
			
		||||
      var fullPath = null
 | 
			
		||||
      if (item.isFile) fullPath = item.path
 | 
			
		||||
      else fullPath = Path.join(item.path, remainingPath)
 | 
			
		||||
      res.sendFile(fullPath)
 | 
			
		||||
    })
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user