@openfin/multer-s3
Advanced tools
Comparing version 2.0.1 to 2.2.0
@@ -95,2 +95,3 @@ /// <reference types="node" /> | ||
streamTransformers: TransformFuncs[]; | ||
onUpload: (req: express.Request, storage: S3Storage, file: S3File) => any; | ||
constructor(opts: S3StorageOpts); | ||
@@ -97,0 +98,0 @@ _handleFile(req: express.Request, file: Express.Multer.File, cb: (error: Error, data?: any) => void): Promise<void>; |
@@ -183,2 +183,22 @@ "use strict"; | ||
return reject(err); | ||
if (this.onUpload) { | ||
const fileData = { | ||
bucket: args.bucket, | ||
acl: args.acl, | ||
cacheControl: args.cacheControl, | ||
contentDisposition: args.contentDisposition, | ||
contentType: args.contentType, | ||
key: args.key, | ||
metadata: args.metadata, | ||
serverSideEncryption: args.serverSideEncryption, | ||
serverSideEncryptionKMSKeyId: args.serverSideEncryptionKMSKeyId, | ||
serverSideEncryptionCustomerAlgorithm: args.serverSideEncryptionCustomerAlgorithm, | ||
serverSideEncryptionCustomerKey: args.serverSideEncryptionCustomerKey, | ||
serverSideEncryptionCustomerKeyMD5: args.serverSideEncryptionCustomerKeyMD5, | ||
storageClass: args.storageClass, | ||
location: data.Location, | ||
etag: data.ETag | ||
}; | ||
this.onUpload(req, this, Object.assign({}, file, fileData)); | ||
} | ||
resolve(Object.assign({}, args, { | ||
@@ -185,0 +205,0 @@ location: data.Location, |
{ | ||
"name": "@openfin/multer-s3", | ||
"version": "2.0.1", | ||
"version": "2.2.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17248
6
335