File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ var downloader = require('s3-download-stream');
44var debug = require ( 'debug' ) ( 's3-blob-store' ) ;
55var mime = require ( 'mime-types' ) ;
66var uploadStream = require ( 's3-stream-upload' ) ;
7+ var util = require ( 'util' ) ;
78
89/**
910 * Create S3 blob store
@@ -115,6 +116,18 @@ S3BlobStore.prototype._s3params = function (opts, s3opts) {
115116 return params ;
116117} ;
117118
119+ S3BlobStore . prototype . uploadParams = util . deprecate ( function ( opts ) {
120+ opts = opts || { } ;
121+ var params = this . _s3params ( opts ) ;
122+ var contentType = opts . contentType || mime . lookup ( params . Key ) ;
123+ if ( contentType ) params . ContentType = contentType ;
124+ return params ;
125+ } , 'S3BlobStore#uploadParams(opts) is deprecated and will be removed in upcoming v5!' ) ;
126+
127+ S3BlobStore . prototype . downloadParams = util . deprecate ( function ( opts ) {
128+ return this . _s3params ( opts ) ;
129+ } , 'S3BlobStore#downloadParams(opts) is deprecated and will be removed in upcoming v5!' ) ;
130+
118131module . exports = S3BlobStore ;
119132
120133/** @typedef {import('stream').Readable } ReadableStream */
You can’t perform that action at this time.
0 commit comments