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');
4
4
var debug = require ( 'debug' ) ( 's3-blob-store' ) ;
5
5
var mime = require ( 'mime-types' ) ;
6
6
var uploadStream = require ( 's3-stream-upload' ) ;
7
+ var util = require ( 'util' ) ;
7
8
8
9
/**
9
10
* Create S3 blob store
@@ -115,6 +116,18 @@ S3BlobStore.prototype._s3params = function (opts, s3opts) {
115
116
return params ;
116
117
} ;
117
118
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
+
118
131
module . exports = S3BlobStore ;
119
132
120
133
/** @typedef {import('stream').Readable } ReadableStream */
You can’t perform that action at this time.
0 commit comments