CollectionFS S3 error when remove non-image files


#1

I use CollectionFS S3. Everything work perfectly with image-type files. But, when I remove file using:

      var file = Files.findOne(file._id);
      file.remove();

if file is image type, it work succesfully. But if it is a non-image file (pdf, rar,…), it return error:

W20151107-16:56:16.949(7)? (STDERR) /home/duonglei/Namsoft/Projects/SEN/.meteor/local/isopacks/cfs_s3/npm/node_modules/aws-sdk/lib/request.js:32
W20151107-16:56:16.949(7)? (STDERR)           throw err;
W20151107-16:56:16.949(7)? (STDERR)                 ^
W20151107-16:56:16.961(7)? (STDERR) TypeError: undefined is not a function
W20151107-16:56:16.961(7)? (STDERR)     at Response.FS.Store.S3.FS.StorageAdapter.remove (packages/cfs_s3/s3.server.js:166:1)
W20151107-16:56:16.961(7)? (STDERR)     at Request.AWS.Request.inherit.send (/home/duonglei/Namsoft/Projects/SEN/.meteor/local/isopacks/cfs_s3/npm/node_modules/aws-sdk/lib/request.js:350:18)
W20151107-16:56:16.961(7)? (STDERR)     at Request.callListeners (/home/duonglei/Namsoft/Projects/SEN/.meteor/local/isopacks/cfs_s3/npm/node_modules/aws-sdk/lib/sequential_executor.js:100:18)
W20151107-16:56:16.962(7)? (STDERR)     at Request.emit (/home/duonglei/Namsoft/Projects/SEN/.meteor/local/isopacks/cfs_s3/npm/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
W20151107-16:56:16.962(7)? (STDERR)     at Request.emit (/home/duonglei/Namsoft/Projects/SEN/.meteor/local/isopacks/cfs_s3/npm/node_modules/aws-sdk/lib/request.js:604:14)
W20151107-16:56:16.962(7)? (STDERR)     at Request.fsm.setupStates.transition (/home/duonglei/Namsoft/Projects/SEN/.meteor/local/isopacks/cfs_s3/npm/node_modules/aws-sdk/lib/request.js:21:12)
W20151107-16:56:16.962(7)? (STDERR)     at AcceptorStateMachine.runTo (/home/duonglei/Namsoft/Projects/SEN/.meteor/local/isopacks/cfs_s3/npm/node_modules/aws-sdk/lib/state_machine.js:14:12)
W20151107-16:56:16.962(7)? (STDERR)     at /home/duonglei/Namsoft/Projects/SEN/.meteor/local/isopacks/cfs_s3/npm/node_modules/aws-sdk/lib/state_machine.js:26:10
W20151107-16:56:16.963(7)? (STDERR)     at Request.fsm.setupStates.err.domainEmitter (/home/duonglei/Namsoft/Projects/SEN/.meteor/local/isopacks/cfs_s3/npm/node_modules/aws-sdk/lib/request.js:22:9)
W20151107-16:56:16.963(7)? (STDERR)     at Request.AWS.Request.inherit.emitEvent (/home/duonglei/Namsoft/Projects/SEN/.meteor/local/isopacks/cfs_s3/npm/node_modules/aws-sdk/lib/request.js:606:12)

What is the cause of this ?
Please help me.
Thank you in advance.


#2

Could anyone help me here ?