mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-13 08:55:50 +01:00
Migrate: add extension to files which are attached to issue
This commit is contained in:
@@ -25,7 +25,9 @@ class FileUploadController extends ScalatraServlet with FileUploadSupport {
|
||||
|
||||
post("/image/:owner/:repository"){
|
||||
execute { (file, fileId) =>
|
||||
FileUtils.writeByteArrayToFile(new java.io.File(getAttachedDir(params("owner"), params("repository")), fileId), file.get)
|
||||
FileUtils.writeByteArrayToFile(new java.io.File(
|
||||
getAttachedDir(params("owner"), params("repository")),
|
||||
fileId + "." + FileUtil.getExtension(file.getName)), file.get)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user