File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -330,8 +330,8 @@ function putObject() {
330330 // 格式1. 传入文件内容
331331 // Body: fs.readFileSync(filepath),
332332 // 格式2. 传入文件流,必须需要传文件大小
333- // Body: fs.createReadStream(filepath),
334- // ContentLength: fs.statSync(filepath).size
333+ Body : fs . createReadStream ( filepath ) ,
334+ ContentLength : fs . statSync ( filepath ) . size
335335 } , function ( err , data ) {
336336 if ( err ) {
337337 console . log ( err ) ;
@@ -371,10 +371,7 @@ function getObject() {
371371 Bucket : config . Bucket ,
372372 Region : config . Region ,
373373 Key : '1mb.zip' ,
374- // 格式1. 传文件路径
375- FilePath : filepath ,
376- // 格式2:传写文件流
377- // Output: fs.createWriteStream(filepath)
374+ Output : fs . createWriteStream ( filepath )
378375 } , function ( err , data ) {
379376 if ( err ) {
380377 return console . log ( err ) ;
You can’t perform that action at this time.
0 commit comments