Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-s3-upload

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-s3-upload - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

5

docs/changelog.md
# Changelog
## Version 1.3.1
* Fix Metadata/ContentEncoding overwrite.
## Version 1.3.0

@@ -4,0 +9,0 @@

40

index.js

@@ -33,4 +33,4 @@ var es = require('event-stream')

var keyTransform, keyname, keyparts, filename,
mimetype, mime_lookup_name, metadata, content_encoding,
mapped_params
mimetype, mime_lookup_name,
metadata = null, content_encoding = null
;

@@ -102,10 +102,6 @@

if (_.isUndefined(options.Metadata) && options.metadataMap) {
if (_.isFunction(options.metadataMap)) {
metadata = options.metadataMap(keyname);
} else {
metadata = options.metadataMap;
}
} else if(_.isObject(options.Metadata)) {
metadata = options.Metadata;
if (_.isFunction(options.metadataMap)) {
metadata = options.metadataMap(keyname);
} else if(_.isObject(options.metadataMap)) {
options.Metadata = options.metadataMap;
}

@@ -119,10 +115,6 @@

if (_.isUndefined(options.ContentEncoding) && options.manualContentEncoding) {
if(_.isFunction(options.manualContentEncoding)) {
content_encoding = options.manualContentEncoding(keyname);
} else {
content_encoding = options.manualContentEncoding;
}
} else if(_.isString(options.ContentEncoding)) {
content_encoding = options.ContentEncoding;
if(_.isFunction(options.manualContentEncoding)) {
content_encoding = options.manualContentEncoding(keyname);
} else if(_.isString(options.manualContentEncoding)) {
options.ContentEncoding = options.manualContentEncoding;
}

@@ -196,5 +188,13 @@

objOpts.ContentType = mimetype;
objOpts.Metadata = metadata;
objOpts.ContentEncoding = content_encoding;
if(!_.isNull(metadata)) {
// existing objOpts.Metadata gets overwrriten
objOpts.Metadata = metadata;
}
if(!_.isNull(metadata)) {
// existing objOpts.ContentEncoding gets overwrriten
objOpts.ContentEncoding = content_encoding;
}
if (options.uploadNewFilesOnly && !head_data || !options.uploadNewFilesOnly) {

@@ -201,0 +201,0 @@

{
"name": "gulp-s3-upload",
"version": "1.3.0",
"version": "1.3.1",
"description": "A gulp task to asynchronous upload/update assets to an AWS S3 Bucket.",

@@ -5,0 +5,0 @@ "main": "index.js",

# gulp-s3-upload
__Version 1.3.0__
__Version 1.3.1__

@@ -113,3 +113,3 @@ Use for uploading assets to Amazon S3 servers.

**NEW IN 1.2**
**NEW IN 1.3**

@@ -116,0 +116,0 @@ Upon reviewing an issue with `metadataMap` and `manualContentEncoding`, a standard method for mapping each `s3.putObject` param was created. For now, `metadataMap` and `manualContentEncoding` are still available, but they will be depricated in the next major version (2.0).

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc