Skip to content

Please specify a storage - S3 #94

@alexpchin

Description

@alexpchin

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
   }
 };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions