madhums / madhums/node-imager

Please specify a storage - S3

Open
#94 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
267
Forks
60
PR merge metrics
No merged PRs in 30d

Description

I'm trying to get the module to work with S3 - however, I keep getting the error:

```
Please specify a storage
```

I've tried both:

```
var imager = new Imager(imagerConfig.variants.item, imagerConfig.storages.amazon);
var imager = new Imager(imagerConfig.storages.amazon);
```

With the config:

```
var config = require("./config");

/**
* Expose
*/

exports.variants = {
item: { // variant
thumb: { // preset
options: { // preset options
pool: 5,
scale: { width: 200, height: 150, type: 'contain' },
crop: { width: 200, height: 150, x: 0, y: 0 },
format: 'png',
rotate: 'auto',
},
rename: function (file, preset) {
return;
// return 'users/1/' + preset + '/' + file.name;
}
},
large: {
original: true // upload original image without image processing
}
}
};

exports.storages = {
local: {
provider: 'local',
path: '/tmp',
mode: 0777
},
amazon: {
provider: 'amazon',
key: config.amazon.secret,
keyId: config.amazon.id,
container: config.amazon.bucket
}
};
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Imager constructor and trace how the config.storages.amazon object is validated, using the reported "Please specify a storage" error as the entry point. Determine why the shown S3 configuration is rejected and verify that a supported S3 storage configuration is accepted.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, javascript, nodejs
Domain
cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.