File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -59,9 +59,11 @@ module.exports = function (options) {
59
59
map = { } ,
60
60
counter = 1 ,
61
61
redirect ,
62
+ userId ,
62
63
finish = _ . bind ( function ( ) {
63
64
if ( ! -- counter ) {
64
65
_ . each ( files , function ( fileInfo ) {
66
+ fileInfo . ownerId = userId ;
65
67
this . initUrls ( fileInfo ) ;
66
68
this . emit ( 'end' , fileInfo ) ;
67
69
} , this ) ;
@@ -76,14 +78,19 @@ module.exports = function (options) {
76
78
. on ( 'fileBegin' , function ( name , file ) {
77
79
tmpFiles . push ( file . path ) ;
78
80
var fileInfo = new FileInfo ( file ) ;
81
+ fileInfo . uploadType = options . uploadType ;
82
+ // fileInfo.ownerId = this.req.user.id;
79
83
fileInfo . safeName ( ) ;
80
84
map [ path . basename ( file . path ) ] = fileInfo ;
81
85
files . push ( fileInfo ) ;
82
86
self . emit ( 'begin' , fileInfo ) ;
83
87
} )
84
88
. on ( 'field' , function ( name , value ) {
89
+ console . log ( 'name: ' + name + ' value ' + value ) ;
85
90
if ( name === 'redirect' ) {
86
91
redirect = value ;
92
+ } else if ( name === 'userId' ) {
93
+ userId = value ;
87
94
}
88
95
} )
89
96
. on ( 'file' , function ( name , file ) {
You can’t perform that action at this time.
0 commit comments