Skip to content

Meteor package for generating s3 Upload and Download Policies

Notifications You must be signed in to change notification settings

davidworkman9/s3Policies

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

s3Policies

This package is a Meteor smart package wrapper of this NPM module:

As far as I can tell the original is abandoned and was left with a pretty serious bug(couldn't create policies for downloading files with spaces). I fixed this issue and wrapped it as a meteor package.

Creating Write Policies

var MAXIMUM_MB = 10, SECONDS_BEFORE_TIMEOUT = 60;
var s3 = new S3Policies('AWS_KEY', 'AES_SECRET_KEY');
var policy = s3.writePolicy('KEY', 'BUCKET', SECONDS_BEFORE_TIMEOUT, MAXIMUM_MB);

Creating Read Policies

var SECONDS_BEFORE_TIMEOUT = 60;
var s3 = new S3Policies('AWS_KEY', 'AES_SECRET_KEY');
var url = s3.readPolicy('KEY', 'BUCKET', SECONDS_BEFORE_TIMEOUT, 'FORCE_FILENAME', 'REGION');

About

Meteor package for generating s3 Upload and Download Policies

Resources

Stars

Watchers

Forks

Packages

No packages published