@yappbox/media-exporter
v2.0.0
Published
Parse a CSV file, create a zip file, and upload it to S3
Downloads
10
Readme
Yapp Media Exporter
Load from local CSV file, output to local zip file:
./bin/media-export --sourceFile SocialFeed.csv --outputFile ./SocialFeed.zip
Load from URL, output to s3:
./bin/export -u https://www.test.com/feed.csv -f conference-social-feed
Details:
S3 object expiration: https://aws.amazon.com/about-aws/whats-new/2011/12/27/amazon-s3-announces-object-expiration/
Progress bar package:
- https://www.npmjs.com/package/progress
- https://www.npmjs.com/package/ora
This is run as a one-off dyno by MediaExportJob in yapp-server using the heroku platform api: https://devcenter.heroku.com/articles/platform-api-reference#dyno-create
To make all uploads to the yapp-media-export bucket public by default, add the following policy to the bucket's permission:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicRead",
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:GetObject",
"s3:GetObjectVersion"
],
"Resource": "arn:aws:s3:::yapp-media-exports/*"
}
]
}