papercut
papercut copied to clipboard
Bucket for scheme
How about adding the ability to configure a particular bucket for a given schema as opposed to bucket per papercut instance?
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.
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
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.
I second @jesseclark's suggestion. The ability to have certain schema/uploaders target certain subdirectories of the destination would be excellent.
Here's a pull request for this.
This should allow you to completely customize the schema's config.