Gathering detailed insights and metrics for multer-s3-rotate
Gathering detailed insights and metrics for multer-s3-rotate
Gathering detailed insights and metrics for multer-s3-rotate
Gathering detailed insights and metrics for multer-s3-rotate
Multer s3 extended to handle rotation of images using EXIF Orientation tag
npm install multer-s3-rotate
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
4 Stars
7 Commits
4 Forks
1 Watchers
6 Branches
4 Contributors
Updated on Dec 08, 2022
Latest Version
1.2.0
Package Id
multer-s3-rotate@1.2.0
Unpacked Size
20.49 kB
Size
5.53 kB
File Count
8
NPM Version
6.14.15
Node Version
14.18.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
4
This project is mostly an extension of multer-s3. As many images from an iPhone were rotating while uploading, we extended the code to solve this issue using sharp.
1npm install --save multer-s3-rotate
1var aws = require('aws-sdk') 2var express = require('express') 3var multer = require('multer') 4var multerS3 = require('multer-s3-rotate') 5 6var app = express() 7var s3 = new aws.S3({ /* ... */ }) 8 9var upload = multer({ 10 storage: multerS3({ 11 s3: s3, 12 bucket: 'some-bucket', 13 metadata: function (req, file, cb) { 14 cb(null, {fieldName: file.fieldname}); 15 }, 16 key: function (req, file, cb) { 17 cb(null, Date.now().toString()) 18 } 19 }) 20}) 21 22app.post('/upload', upload.array('photos', 3), function(req, res, next) { 23 res.send('Successfully uploaded ' + req.files.length + ' files!') 24})
To resize image, add resize and resizeOpts keys to the object
1var aws = require('aws-sdk') 2var express = require('express') 3var multer = require('multer') 4var multerS3 = require('multer-s3-rotate') 5 6var app = express() 7var s3 = new aws.S3({ /* ... */ }) 8 9var upload = multer({ 10 storage: multerS3({ 11 s3: s3, 12 bucket: 'some-bucket', 13 resize: true, // default false 14 resizeOpts: { // Required if resize is true 15 width: 400, 16 height:400, 17 fit: 'inside' 18 }, 19 metadata: function (req, file, cb) { 20 cb(null, {fieldName: file.fieldname}); 21 }, 22 key: function (req, file, cb) { 23 cb(null, Date.now().toString()) 24 } 25 }) 26}) 27 28app.post('/upload', upload.array('photos', 3), function(req, res, next) { 29 res.send('Successfully uploaded ' + req.files.length + ' files!') 30})
The tests mock all access to S3 and can be run completely offline.
1npm test
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 1/6 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
17 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More