Skip to content

Commit

Permalink
修改上传图片
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonxu committed Mar 19, 2014
1 parent b636b70 commit cc30bd9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion _src/plugins/autoupload.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ UM.plugins['autoupload'] = function () {
xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
xhr.addEventListener('load', function (e) {
try {
var json = JSON ? JSON.parse(e.target.response):eval('('+e.target.response+')'),
var json = eval('('+e.target.response+')'),
link = json.url,
picLink = me.options.imagePath + link;
editor.execCommand('insertimage', {
Expand Down
2 changes: 1 addition & 1 deletion dialogs/image/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
uploadComplete: function(r){
var me = this;
try{
var json = window.JSON ? JSON.parse(r):eval('('+r+')');
var json = eval('('+r+')');
Base.callback(me.editor, me.dialog, json.url, json.state);
}catch (e){
var lang = me.editor.getLang('image');
Expand Down

0 comments on commit cc30bd9

Please sign in to comment.