File tree Expand file tree Collapse file tree 2 files changed +452
-450
lines changed Expand file tree Collapse file tree 2 files changed +452
-450
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ module.exports = function(opts) {
76
76
if ( url . indexOf ( options . storage . options . domain ) > - 1 ) {
77
77
try {
78
78
client . delete ( fileName , function ( err ) {
79
- callback && callback . call ( null , err ) ;
79
+ callback && callback . call ( null , err ) ;
80
80
} )
81
81
} catch ( e ) {
82
82
console . log ( '删除7牛图片失败' , e ) ;
@@ -85,7 +85,7 @@ module.exports = function(opts) {
85
85
} else {
86
86
fs . unlink ( options . uploadDir + '/' + fileName , function ( err ) {
87
87
callback && callback . call ( null , err ) ;
88
- } ) ;
88
+ } ) ;
89
89
}
90
90
} else {
91
91
callback && callback . call ( null , '文件类型错误' ) ;
@@ -144,7 +144,8 @@ module.exports = function(opts) {
144
144
console . log ( '头部信息2' , req . header )
145
145
console . log ( '主机名:' , host )
146
146
result . push ( {
147
- url : initUrls ( host , sName ) ,
147
+ // url: initUrls(host, sName),
148
+ url : options . uploadUrl + encodeURIComponent ( sName ) ,
148
149
name : sName ,
149
150
size : file . size ,
150
151
type : file . type
@@ -156,4 +157,4 @@ module.exports = function(opts) {
156
157
}
157
158
} ;
158
159
return Uploader ;
159
- } ;
160
+ } ;
You can’t perform that action at this time.
0 commit comments