Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

blitline-s3

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blitline-s3 - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

11

lib/index.js

@@ -82,3 +82,3 @@ 'use strict';

exports.default = function (config) {
exports.default = function (config, jobOptions) {
var APPLICATION_ID = config.APPLICATION_ID;

@@ -129,8 +129,9 @@ var BUCKET = config.BUCKET;

return function (src, functions) {
_simple_blitline_node2.default.addJob({
application_id: APPLICATION_ID,
return function (src, functions, options) {
_simple_blitline_node2.default.addJob(_extends({}, jobOptions, {
application_id: APPLICATION_ID
}, options, {
src: src,
functions: functions.map(configFunction)
});
}));

@@ -137,0 +138,0 @@ return _simple_blitline_node2.default.postJobs().then(pollFromJobResponse).then(formatPollingResponse);

{
"name": "blitline-s3",
"version": "0.0.1",
"version": "0.0.2",
"description": "Post Blitline jobs that uploads to s3 and do polling for the jobs.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

# blitline-s3
Post Blitline jobs that uploads to s3 and do polling for the jobs.
### Install
```
npm install --save blitline-s3
```
### Usage
```javascript
// Require and configure Blitline
var blitline = require('blitline-s3')({
APPLICATION_ID: 'APP_ID', // Your Blitline Application ID
BUCKET: 'YourS3Bucket', // Your Amazon S3 Bucket Name
NAME_PREFIX: 'uploads/' // Prefix for New Images Created By Blitline
});
// Send a job to Blitline
blitline('http://www.source.to/your-image.jpg', [{
name: 'resize',
params: {
width: 10,
height: 10
},
save: 'your-image-resized.jpg' // Shortcut
}, {...}]).then(function(response) {
console.log(response);
/*
{
jobId: 'blitline_job_id',
originalMeta: {
width: 100,
height: 100
},
images: [{
url: 'http://YourS3Bucket.s3.amazonaws.com/uploads/your-image-resized.jpg',
meta: {
width: 10,
height: 10
}
}, {...}]
}
*/
}, function(error) {
console.error(error);
});
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc