s3-contenttype-fixer

1.0.4 • Public • Published

S3 ContentType Fixer

This CLI script fixes the content types of the files in your S3 bucket.

Installation

npm i -g s3-contenttype-fixer

Usage

Usage is simple, run:

s3-contenttype-fixer -a <AccessKey> -s <Secret> -b <Bucket> -r <Region>

You can also prefix using the option:

-p <Prefix>

How it works

The script loops through all your keys within the bucket (or all the keys with the chosen prefix) and checks which content/mime type is expected for file extension within the key. If this is the same as the content type of the file, no action is taken, otherwise, the content type is changed to the expected content type.

Package Sidebar

Install

npm i s3-contenttype-fixer

Weekly Downloads

6

Version

1.0.4

License

ISC

Last publish

Collaborators

  • boite