mirror of https://github.com/go-gitea/gitea.git
fix cannot parse JSON for attachments
This commit is contained in:
parent
f183c855d1
commit
17f3e840ec
|
@ -223,7 +223,7 @@ $(document).ready(function () {
|
||||||
$('.dropdown').dropdown();
|
$('.dropdown').dropdown();
|
||||||
$('.jump.dropdown').dropdown({
|
$('.jump.dropdown').dropdown({
|
||||||
action: 'hide',
|
action: 'hide',
|
||||||
onShow: function() {
|
onShow: function () {
|
||||||
$('.poping.up').popup('hide');
|
$('.poping.up').popup('hide');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -237,8 +237,8 @@ $(document).ready(function () {
|
||||||
});
|
});
|
||||||
$('.poping.up').popup();
|
$('.poping.up').popup();
|
||||||
$('.top.menu .poping.up').popup({
|
$('.top.menu .poping.up').popup({
|
||||||
onShow: function() {
|
onShow: function () {
|
||||||
if ( $('.top.menu .menu.transition').hasClass('visible') ) {
|
if ($('.top.menu .menu.transition').hasClass('visible')) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -724,6 +725,7 @@ func uploadFiles(ctx *middleware.Context, issueId, commentId int64) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
os.MkdirAll(setting.AttachmentPath, os.ModePerm)
|
||||||
out, err := ioutil.TempFile(setting.AttachmentPath, "attachment_")
|
out, err := ioutil.TempFile(setting.AttachmentPath, "attachment_")
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue