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

giga

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

giga - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

9

lib/Giga.js
'use strict';
const path = require('path');
const url = require('url');
const uuidV4 = require('uuid/v4');

@@ -27,3 +28,4 @@

const result = {
filePath
filePath,
url: url.resolve(this.storage.baseUrl, filePath)
};

@@ -53,3 +55,6 @@

const result = { filePath };
const result = {
filePath,
url: url.resolve(this.storage.baseUrl, filePath)
};
return this.storage.download(filePath, options)

@@ -56,0 +61,0 @@ .then(src => {

{
"name": "giga",
"version": "0.2.0",
"version": "0.2.1",
"description": "Easy streaming upload and download for storages(File System, AWS S3)",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -5,2 +5,3 @@ 'use strict';

const path = require('path');
const url = require('url');

@@ -44,3 +45,9 @@

this.protocol = 'file';
this.root = path.normalize(this.options.root);
const baseUrl = url.format({
protocol: this.protocol,
host: this.root
});
this.baseUrl = baseUrl.replace(/([^/])$/, '$1/');
}

@@ -47,0 +54,0 @@

'use strict';
const url = require('url');
const S3 = require('aws-sdk/clients/s3');

@@ -21,3 +22,10 @@

}, options);
this.protocol = 's3';
this.bucket = this.options.bucket;
const baseUrl = url.format({
protocol: this.protocol,
host: this.bucket,
slashes: true
});
this.baseUrl = baseUrl.replace(/([^/])$/, '$1/');
this.options.params['Bucket'] = this.bucket;

@@ -24,0 +32,0 @@ this.client = new S3(this.options);

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