mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-09 06:55:54 +01:00
(refs #105)Specify suitable Content-Type header for downloaded file.
This commit is contained in:
@@ -40,6 +40,10 @@ object FileUtil {
|
||||
}
|
||||
}
|
||||
|
||||
def getFileName(path: String): String = defining(path.lastIndexOf('/')){ i =>
|
||||
if(i >= 0) path.substring(i + 1) else path
|
||||
}
|
||||
|
||||
def getExtension(name: String): String =
|
||||
name.lastIndexOf('.') match {
|
||||
case i if(i >= 0) => name.substring(i + 1)
|
||||
|
||||
Reference in New Issue
Block a user