File tree Expand file tree Collapse file tree 1 file changed +19
-13
lines changed
Expand file tree Collapse file tree 1 file changed +19
-13
lines changed Original file line number Diff line number Diff line change @@ -90,18 +90,24 @@ export default class Uploader {
9090 gatheringSpinner . start ( ) ;
9191
9292 return new Promise ( ( resolve , reject ) => {
93- glob ( `**/${ globPath } ` , { cwd : path . resolve ( localPath ) } , ( err , files ) => {
94- if ( err ) {
95- gatheringSpinner . fail ( err ) ;
96- reject ( err ) ;
97- }
98-
99- gatheringSpinner . succeed (
100- `Found ${ chalk . green ( files . length ) } files at ${ chalk . blue ( localPath ) } , starting upload:` ,
101- ) ;
102-
103- resolve ( files ) ;
104- } ) ;
93+ glob (
94+ `**/${ globPath } ` ,
95+ { cwd : path . resolve ( localPath ) } ,
96+ ( err , files ) => {
97+ if ( err ) {
98+ gatheringSpinner . fail ( err ) ;
99+ reject ( err ) ;
100+ }
101+
102+ gatheringSpinner . succeed (
103+ `Found ${ chalk . green ( files . length ) } files at ${ chalk . blue (
104+ localPath
105+ ) } , starting upload:`,
106+ ) ;
107+
108+ resolve ( files ) ;
109+ } ,
110+ ) ;
105111 } ) ;
106112 }
107113
@@ -111,7 +117,7 @@ export default class Uploader {
111117
112118 const params = {
113119 Bucket,
114- Key : remotePath . replace ( / \\ / , '/' ) ,
120+ Key : remotePath . replace ( / \\ / g , '/' ) ,
115121 Body : body ,
116122 ContentType : mime . getType ( localFilePath ) ,
117123 CacheControl : this . getCacheControlValue ( localFilePath ) ,
You can’t perform that action at this time.
0 commit comments