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

amazon-s3

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amazon-s3 - npm Package Compare versions

Comparing version 1.0.1 to 2.0.0

11

index.js

@@ -40,7 +40,8 @@ var sha256 = require('crypto-js/sha256');

const service = 's3';
const host = (this.domain !== 'digitaloceanspaces.com')
? `${bucket}.${service}.${this.region}.${this.domain}`
: `${bucket}.${this.region}.${this.domain}`
const host = this.host ? this.host :
(this.domain !== 'digitaloceanspaces.com')
? `${bucket}.${service}.${this.region}.${this.domain}`
: `${bucket}.${this.region}.${this.domain}`
const encodedPath = encodePath(path);
const encodedPath = this.pathBucket ? encodePath(`/${bucket}/${path}`) : encodePath(`/${path}`);
const endpoint = `https://${host}${encodedPath}`;

@@ -97,2 +98,4 @@

this.domain = (config.domain !== undefined) ? config.domain : defaultDomain;
this.host = config.host;
this.pathBucket = config.pathBucket;
}

@@ -99,0 +102,0 @@

{
"name": "amazon-s3",
"version": "1.0.1",
"version": "2.0.0",
"description": "Read and write to AWS S3 using fetch()",

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

@@ -24,3 +24,3 @@ # amazon-s3

let bucket = 'testbucket';
let key = '/a/test/file.txt';
let key = 'a/test/file.txt';
let body = 'test file contents';

@@ -27,0 +27,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