Skip to content

🖼An ExpressJs module Image Management to Amazon S3

License

Notifications You must be signed in to change notification settings

upgrad/express-s3-image-resources

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

S3 Gallery Express Middleware

A middleware which adds two APIs to interact with AWS S3

  • POST /upload
  • POST /search/:query

How to use

npm install --save upgrad/express-s3-image-resources
const  app = express();
const  gallery = require("express-s3-image-resources");

const  AWS_CREDS = {
	accessKeyId: "XXXXXXXXXXXXXXXXXXXX",
	secretAccessKey: "XXXXXXXXXXXXXXXXXXXX/XXXXXXXXXXXXXXXXXXX",
	region: "XX-XXXX-X"
};

app.use("/gallery", gallery(AWS_CREDS));

Options

gallery(awsConfigOrInstance, cacheTime)

  • awsConfigOrInstance - This can be either a instance of class AWS or a config mentioned in the above example.

  • cacheTime(ms) - This is the time which needs to be sent to enable caching of s3 bucket data.

About

🖼An ExpressJs module Image Management to Amazon S3

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •