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

@infurnia/backend-file-storage

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@infurnia/backend-file-storage - npm Package Compare versions

Comparing version 2.4.0 to 2.5.0

8

libs/gcp/gcs/index.js
const {Storage} = require('@google-cloud/storage');
const moment = require('moment');
class InfurniaGCSClient {

@@ -102,3 +102,3 @@ constructor(project_id, key_file_path) {

//get signed url
get_signed_url = async(bucket_name, key, permission='read', expiry_in_secs=180) => {
get_signed_url = async(bucket_name, key, permission='read', expiry_in_secs=600) => {
try{

@@ -111,3 +111,5 @@ if (!bucket_name) throw new Error(`bucket_name must be specified`);

const gcs_file = this.gcsClient.bucket(bucket_name).file(key);
const res = await gcs_file.getSignedUrl({action: permission, expires: expiry_in_secs});
let expires = new Date();
expires = moment(expires).add(expiry_in_secs, 's').toDate();
const res = await gcs_file.getSignedUrl({action: permission, expires: expires});
return res[0];

@@ -114,0 +116,0 @@ }

{
"name": "@infurnia/backend-file-storage",
"version": "2.4.0",
"version": "2.5.0",
"description": "Storage engine for google cloud storage",

@@ -25,2 +25,3 @@ "main": "index.js",

"fs": "0.0.1-security",
"moment": "^2.29.4",
"path": "^0.12.7"

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