{"id":24298559,"url":"https://github.com/ikhsanalatsary/multer-sharp-s3","last_synced_at":"2025-10-04T07:37:22.079Z","repository":{"id":33234077,"uuid":"152455335","full_name":"ikhsanalatsary/multer-sharp-s3","owner":"ikhsanalatsary","description":"Multer Sharp S3 is streaming multer storage engine permit to transform / resize the image and upload to AWS S3.","archived":false,"fork":false,"pushed_at":"2024-09-06T06:13:01.000Z","size":1196,"stargazers_count":54,"open_issues_count":24,"forks_count":36,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-03T22:13:21.807Z","etag":null,"topics":["aws","aws-s3","formdata","multer","sharp","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ikhsanalatsary.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"patreon":"ikhsaan","custom":["https://www.paypal.com/paypalme/abdulikhsan"]}},"created_at":"2018-10-10T16:31:01.000Z","updated_at":"2024-11-07T00:00:20.000Z","dependencies_parsed_at":"2023-12-19T11:05:16.525Z","dependency_job_id":"ad9469e0-1c25-4992-8d88-21b93b838f81","html_url":"https://github.com/ikhsanalatsary/multer-sharp-s3","commit_stats":{"total_commits":92,"total_committers":9,"mean_commits":"10.222222222222221","dds":"0.44565217391304346","last_synced_commit":"e67954ffe968c1d2da9882713e15faa13aaa62e9"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/ikhsanalatsary/multer-sharp-s3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikhsanalatsary%2Fmulter-sharp-s3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikhsanalatsary%2Fmulter-sharp-s3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikhsanalatsary%2Fmulter-sharp-s3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikhsanalatsary%2Fmulter-sharp-s3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ikhsanalatsary","download_url":"https://codeload.github.com/ikhsanalatsary/multer-sharp-s3/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikhsanalatsary%2Fmulter-sharp-s3/sbom","scorecard":{"id":483736,"data":{"date":"2025-08-11","repo":{"name":"github.com/ikhsanalatsary/multer-sharp-s3","commit":"e67954ffe968c1d2da9882713e15faa13aaa62e9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.1,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":1,"reason":"Found 2/15 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 18 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"57 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-rrc9-gqf8-8rwg","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-xp63-6vf5-xf3v","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-h452-7996-h45h","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-wm7h-9275-46v2","Warn: Project is vulnerable to: GHSA-ff7x-qrg7-qggm","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-44fp-w29j-9vj5","Warn: Project is vulnerable to: GHSA-w7rc-rwvf-8q5r","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-gp95-ppv5-3jc5","Warn: Project is vulnerable to: GHSA-54xq-cgqr-rpm3","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw","Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-pq67-2wwv-3xjx","Warn: Project is vulnerable to: GHSA-8cj5-5rvv-wf4v","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-776f-qx25-q3cc","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T17:16:32.338Z","repository_id":33234077,"created_at":"2025-08-19T17:16:32.338Z","updated_at":"2025-08-19T17:16:32.338Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278283486,"owners_count":25961309,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-s3","formdata","multer","sharp","typescript"],"created_at":"2025-01-16T21:00:14.166Z","updated_at":"2025-10-04T07:37:22.058Z","avatar_url":"https://github.com/ikhsanalatsary.png","language":"TypeScript","funding_links":["https://patreon.com/ikhsaan","https://www.paypal.com/paypalme/abdulikhsan"],"categories":[],"sub_categories":[],"readme":"# multer-sharp-s3\n\n[![Build Status](https://travis-ci.org/ikhsanalatsary/multer-sharp-s3.svg?branch=master)](https://travis-ci.org/ikhsanalatsary/multer-sharp-s3)\n[![codecov.io](https://codecov.io/gh/ikhsanalatsary/multer-sharp-s3/coverage.svg?branch=master)](https://codecov.io/gh/ikhsanalatsary/multer-sharp?branch=master) [![Depedencies Status](https://david-dm.org/ikhsanalatsary/multer-sharp-s3.svg)](https://david-dm.org/ikhsanalatsary/multer-sharp-s3) [![devDepedencies Status](https://david-dm.org/ikhsanalatsary/multer-sharp-s3/dev-status.svg)](https://david-dm.org/ikhsanalatsary/multer-sharp-s3?type=dev)\n[![npm](https://img.shields.io/npm/dm/multer-sharp-s3.svg)](http://npm.im/multer-sharp-s3)\n[![Greenkeeper badge](https://badges.greenkeeper.io/ikhsanalatsary/multer-sharp-s3.svg)](https://greenkeeper.io/)\n\n[![DigitalOcean Referral Badge](https://web-platforms.sfo2.digitaloceanspaces.com/WWW/Badge%203.svg)](https://www.digitalocean.com/?refcode=dec9802955b6\u0026utm_campaign=Referral_Invite\u0026utm_medium=Referral_Program\u0026utm_source=badge)\n\n***\n\nMulter Sharp S3 is streaming multer storage engine permit to transform / resize the image and upload to AWS S3.\n\nThis project is mostly an integration piece for existing code samples from Multer's [storage engine documentation](https://github.com/expressjs/multer/blob/master/StorageEngine.md). With add-ons include [AWS S3](https://github.com/aws/aws-sdk-js) and [sharp](https://github.com/lovell/sharp)\n\n# Minimum Requirement:\n\n  Node v12.13.0, npm v6+\n\n# Installation\n\nnpm:\n\n\tnpm install --save aws-sdk multer-sharp-s3\n\nyarn:\n\n\tyarn add aws-sdk multer-sharp-s3\n\n# Tests\nChange aws configuration in your local.\n\n```\nyarn test\n```\n\n# Importing\n### NodeJS\n\n```javascript\nconst s3Storage = require('multer-sharp-s3');\n\nconst storage = s3Storage(options);\n```\n\n### TypeScript\n\n```typescript\nimport * as s3Storage from 'multer-sharp-s3';\n\nconst storage = s3Storage(options);\n```\n\n# Usage\n\n```javascript\nconst express = require('express');\nconst multer = require('multer');\nconst s3Storage = require('multer-sharp-s3');\nconst aws = require('aws-sdk');\n\naws.config.update({\n  secretAccessKey: config.uploads.aws.secretAccessKey, // Not working key, Your SECRET ACCESS KEY from AWS should go here, never share it!!!\n  accessKeyId: config.uploads.aws.accessKeyId, // Not working key, Your ACCESS KEY ID from AWS should go here, never share it!!!\n  region: config.uploads.aws.region, // region of your bucket\n})\n\nconst s3 = new aws.S3()\nconst app = express();\n\n// without resize image\nconst storage = s3Storage({\n  s3,\n  Bucket: config.uploads.aws.Bucket,\n  Key: `${config.uploads.aws.Bucket}/test/${Date.now()}-myImage`,\n  ACL: config.uploads.aws.ACL,\n})\nconst upload = multer({ storage: storage })\n\napp.post('/upload', upload.single('myPic'), (req, res) =\u003e {\n    console.log(req.file); // Print upload details\n    res.send('Successfully uploaded!');\n});\n\n// or\n\n// single resize without Key\nconst storage2 = gcsSharp({\n  s3,\n  Bucket: config.uploads.aws.Bucket,\n  ACL: config.uploads.aws.ACL,\n  resize: {\n    width: 400,\n    height: 400\n  },\n  max: true\n});\nconst upload2 = multer({ storage: storage2 });\n\napp.post('/uploadandresize', upload2.single('myPic'), (req, res, next) =\u003e {\n    console.log(req.file); // Print upload details\n    res.send('Successfully uploaded!');\n});\n\n/* If you need generate image with specific size\n * simply to adding `multiple: true` property and\n * resize must be an `array` and must be include `suffix` property\n * and suffix has a special value that is 'original'\n * it will no transform image, just upload the image as is\n * example below with `Key` as callback function\n */\nconst storage = s3Storage({\n  Key: (req, file, cb) =\u003e {\n    crypto.pseudoRandomBytes(16, (err, raw) =\u003e {\n      cb(err, err ? undefined : raw.toString('hex'))\n    })\n  },\n  s3,\n  Bucket: config.uploads.aws.Bucket,\n  multiple: true,\n  resize: [\n    { suffix: 'xlg', width: 1200, height: 1200 },\n    { suffix: 'lg', width: 800, height: 800 },\n    { suffix: 'md', width: 500, height: 500 },\n    { suffix: 'sm', width: 300, height: 300 },\n    { suffix: 'xs', width: 100 },\n    { suffix: 'original' }\n  ],\n});\nconst upload = multer({ storage });\n\napp.post('/uploadmultiplesize', upload.single('myPic'), (req, res, next) =\u003e {\n    console.log(req.file); // print output\n    res.send('Successfully uploaded!');\n});\n\n/* \n *  If the directory property exists, \n *  the suffix property is ignored and \n *  inserted separated by Bucket's directory.\n */\nconst storage3 = s3Storage({\n  Key: (req, file, cb) =\u003e {\n    crypto.pseudoRandomBytes(16, (err, raw) =\u003e {\n      cb(err, err ? undefined : raw.toString('hex'))\n    })\n  },\n  s3,\n  Bucket: config.uploads.aws.Bucket,\n  multiple: true,\n  resize: [\n    { suffix: 'lg', directory: 'large', width: 800, height: 800 },  // insert BUCKET/large/filename\n    { suffix: 'md', directory: 'medium', width: 500, height: 500 }, // insert BUCKET/medium/filename\n    { suffix: 'sm', directory: 'small', width: 300, height: 300 },  // insert BUCKET/small/filename\n  ],\n});\nconst upload3 = multer({ storage3 });\n\napp.post('/uploadmultiplesize', upload3.single('myPic'), (req, res, next) =\u003e {\n    console.log(req.file); // print output\n    res.send('Successfully uploaded!');\n});\n\n// also can upload any file (non image type)\nconst storage = s3Storage({\n  s3,\n  Bucket: config.uploads.aws.Bucket,\n  Key: `${config.uploads.aws.Bucket}/test/${Date.now()}-myFile`,\n  ACL: config.uploads.aws.ACL,\n  // resize or any sharp options will ignore when uploading non image file type\n  resize: {\n    width: 400,\n    height: 400,\n  },\n})\nconst upload = multer({ storage })\n\napp.post('/uploadfile', upload.single('myFile'), (req, res, next) =\u003e {\n    console.log(req.file); // print output\n    res.send('Successfully uploaded!');\n});\n\n```\n\nfor more example you can see [here](https://github.com/ikhsanalatsary/multer-sharp-s3/blob/master/__tests__/implementation.spec.ts)\n\n\n#### Multer-Sharp-S3 options\nmulter sharp s3 is inherit from s3 upload property [putObjectRequest](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#upload-property).\nBelow are special / custom options from this package\n\n| option | default | value | role |\n| ------ | ------- | ----- | ---- |\n| S3 | no | `object` | instance from AWS.S3 class. it mus be specify |\n| Key | randomString | `string` or `function` | your s3 Key |\n| Bucket | no | `string` | Required your bucket name on AWS S3 to upload. Environment variable - AWS_BUCKET |\n| ACL | 'public-read' | `string` | Required acl credentials file for AWS S3 |\n| multiple | false | `boolean` | for multiple resize to work |\n| resize | no | `object` or `Array\u003cobject\u003e` when multiple is true. **Note:** suffix must be specify when using resize as `Array` | size specification |\n\n#### Sharp options\nPlease visit this **[sharp](http://sharp.pixelplumbing.com/)** for detailed overview of specific option.\n\nmulter sharp s3 embraces sharp options, as table below:\n\n| option | default | value | role |\n| ------ | ------- | ----- | ---- |\n| resize | `undefined` | `object` for output image, as follow: `{ width?: 300, height?: 200, options?: {...resizeOptions} }`. doc: [sharpResizeOptions](https://sharp.pixelplumbing.com/api-resize#resize)  | size specification |\n| crop | `undefined`  | | crop image |\n| background | `undefined` | | set the background for the embed, flatten and extend operations. |\n| embed | `undefined` | | embed on canvas |\n| max | `undefined` | | set maximum output dimension  |\n| min | `undefined` | | set minimum output dimension |\n| withoutEnlargement | `undefined` | | do not enlarge small images |\n| ignoreAspectRatio | `undefined` | | ignore aspect ration while resizing images |\n| extract | `undefined` | | extract specific part of image |\n| trim | `undefined` | | Trim **boring** pixels from all edges |\n| flatten | `undefined` | | Merge alpha transparency channel, if any, with background. |\n| extend | `undefined` | | Extends/pads the edges of the image with background. |\n| negate | `undefined` | | Produces the **negative** of the image. |\n| rotate | `undefined` | | Rotate the output image by either an explicit angle |\n| flip | `undefined` | | Flip the image about the vertical Y axis. |\n| flop | `undefined` | | Flop the image about the horizontal X axis. |\n| blur | `undefined` | | Mild blur of the output image |\n| sharpen | `undefined` | | Mild sharpen of the output image |\n| gamma | `undefined` | | Apply a gamma correction. |\n| grayscale *or* greyscale | `undefined` | | Convert to 8-bit greyscale; 256 shades of grey. |\n| normalize *or* normalise | `undefined` | | Enhance output image contrast by stretching its luminance to cover the full dynamic range. |\n| withMetadata | `undefined` | | Include all metadata (EXIF, XMP, IPTC) from the input image in the output image.\n| convolve | `undefined` | | Convolve the image with the specified kernel.\n| threshold | `undefined` | | Any pixel value greather than or equal to the threshold value will be set to 255, otherwise it will be set to 0\n| toColourspace *or* toColorspace | `undefined` | | Set the output colourspace. By default output image will be web-friendly sRGB, with additional channels interpreted as alpha channels.\n| toFormat | `undefined` | `'jpeg'`, `'png'`, `'magick'`, `'webp'`, `'tiff'`, `'openslide'`, `'dz'`, `'ppm'`, `'fits'`, `'gif'`, `'svg'`, `'pdf'`, `'v'`, `'raw'` or `object`. if `object` specify as follow: `{ type: 'png', options: { ...toFormatOptions } }` doc: [sharpToFormat](https://sharp.pixelplumbing.com/api-output#toformat) | type of output file to produce.|\n\n\n**NOTE** Some of the contents in the above table maybe is not be updated, you can check more [here](https://github.com/ikhsanalatsary/multer-sharp-s3/blob/c40c1d2ed9ace33df51f1ff079d1fb894c521db3/src/get-sharp-options.ts#L3)\n***\n\n## Why\nBecause We need to transform an image using sharp and upload it to AWS S3 using multer middleware at once. Build on top with [TypeScript](https://www.typescriptlang.org/) and reactive using [RxJS](https://rxjs-dev.firebaseapp.com/) as helper library in this package.\n\n![Mantra](http://i.imgur.com/AIimQ8C.jpg)\n\nrefer to: [intro rx](https://gist.github.com/staltz/868e7e9bc2a7b8c1f754#modelling-the-3-suggestions-with-streams)\n\n## License\n[MIT](http://opensource.org/licenses/MIT)\nCopyright (c) 2017 - forever [Abdul Fattah Ikhsan](https://twitter.com/abdfattahikhsan)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fikhsanalatsary%2Fmulter-sharp-s3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fikhsanalatsary%2Fmulter-sharp-s3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fikhsanalatsary%2Fmulter-sharp-s3/lists"}