Socket
Socket
Sign inDemoInstall

filestorage

Package Overview
Dependencies
0
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.3.0 to 1.4.0

33

index.js

@@ -557,3 +557,3 @@ var fs = require('fs');

h['Cache-Control'] = 'max-age=0';
h['Cache-Control'] = 'max-age=5';
h['Content-Type'] = 'multipart/form-data; boundary=' + BOUNDARY;

@@ -784,3 +784,17 @@

var isRange = false;
var expires = new Date();
expires.setMonth(expires.getMonth() + 15);
var headers = {
'Content-Type': stat.type,
'Etag': stat.stamp,
'Last-Modified': new Date(stat.stamp).toUTCString(),
'Accept-Ranges': 'bytes',
'Cache-Control': 'public, max-age=11111111',
'Expires': expires,
'X-Powered-By': 'node.js FileStorage',
'Vary': 'Accept-Encoding',
'Access-Control-Allow-Origin': '*'
};
if (req) {

@@ -790,3 +804,3 @@

res.success = true;
res.writeHead(304);
res.writeHead(304, headers);
res.end();

@@ -817,17 +831,4 @@ return;

var expires = new Date();
expires.setMonth(expires.getMonth() + 2);
headers['Content-Length'] = length;
var headers = {
'Content-Type': stat.type,
'Content-Length': length,
'Etag': stat.stamp,
'Last-Modified': new Date(stat.stamp).toUTCString(),
'Accept-Ranges': 'bytes',
'Cache-Control': 'public',
'Expires': expires,
'X-Powered-By': 'node.js FileStorage',
'Vary': 'Accept-Encoding'
};
if (stat.width > 0)

@@ -834,0 +835,0 @@ headers['X-Image-Width'] = stat.width;

{
"name": "filestorage",
"version": "1.3.0",
"version": "1.4.0",
"description": "File storage for file uploading.",

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc