diff --git a/src/main/scala/gitbucket/core/controller/FileUploadController.scala b/src/main/scala/gitbucket/core/controller/FileUploadController.scala index 8b118d8..d6213a2 100644 --- a/src/main/scala/gitbucket/core/controller/FileUploadController.scala +++ b/src/main/scala/gitbucket/core/controller/FileUploadController.scala @@ -23,7 +23,7 @@ }, FileUtil.isImage) } - post("/image/:owner/:repository"){ + post("/file/:owner/:repository"){ execute({ (file, fileId) => FileUtils.writeByteArrayToFile(new java.io.File( getAttachedDir(params("owner"), params("repository")), diff --git a/src/main/twirl/gitbucket/core/helper/attached.scala.html b/src/main/twirl/gitbucket/core/helper/attached.scala.html index 7bb4726..ad7d838 100644 --- a/src/main/twirl/gitbucket/core/helper/attached.scala.html +++ b/src/main/twirl/gitbucket/core/helper/attached.scala.html @@ -9,7 +9,7 @@ $(function(){ try { $([$('#@textareaId').closest('div')[0], $('#@textareaId').next('div')[0]]).dropzone({ - url: '@path/upload/image/@owner/@repository', + url: '@path/upload/file/@owner/@repository', maxFilesize: 10, acceptedFiles: 'image/*,application/pdf', dictInvalidFileType: 'Unfortunately, we don\'t support that file type. Try again with a PNG, GIF, or JPG.',