papercut icon indicating copy to clipboard operation
papercut copied to clipboard

Bucket for scheme

Open recursivefunk opened this issue 12 years ago • 5 comments

How about adding the ability to configure a particular bucket for a given schema as opposed to bucket per papercut instance?

recursivefunk avatar May 13 '13 19:05 recursivefunk

You means custom bucket settings for schema like this?

var s3processor = papercut.Schema(function(schema){
    schema.set('stroage', 's3');
    //settings...
});

var localProcessor = papercut.Schema(function(schema){
    schema.set('stroage', 'file');
    //settings...
});

Should be easy to implement it, let me know if this api looks okay.

Rafe avatar May 14 '13 00:05 Rafe

Yes, with the option for setting a bucket


var s3Prod = papercut.schema(function(schema) {
  schema.set("storage", "s3");
  schema.set("bucket", "production_bucket");
});

var s3Dev = papercut.schema(function(schema) {
  schema.set("storage", "s3");
  schema.set("bucket", "development_bucket");
});

That api is perfect

recursivefunk avatar May 14 '13 01:05 recursivefunk

It would also be nice if the 'directory' config setting were used for s3 storage too. This would allow users to store images in subdirectories of the bucket instead of only at the root level.

jesseclark avatar Nov 14 '13 19:11 jesseclark

I second @jesseclark's suggestion. The ability to have certain schema/uploaders target certain subdirectories of the destination would be excellent.

dkushner avatar Jul 08 '14 17:07 dkushner

Here's a pull request for this.

This should allow you to completely customize the schema's config.

kennethklee avatar Aug 13 '14 14:08 kennethklee