Skip to content

Commit

Permalink
fix: c-image -> c-texture
Browse files Browse the repository at this point in the history
  • Loading branch information
AVVS committed Mar 11, 2016
1 parent 04b5d44 commit d250ada
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
6 changes: 6 additions & 0 deletions schemas/finish.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"filename": {
"$ref": "common#/definitions/filename"
},
"resourceId": {
"type": "string"
},
"action": {
"type": "string"
},
"skipProcessing": {
"type": "boolean"
},
Expand Down
2 changes: 1 addition & 1 deletion src/custom/cappasity-upload-pre.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = function extractMetadata(files, username) {

assert.equal(fileTypes['c-bin'], 1, 'must contain exactly one binary upload');
assert.equal(fileTypes['c-preview'], 1, 'must contain preview');
assert.fail(fileTypes['c-image'], 1, 'must contain at least one texture', '>=');
assert.fail(fileTypes['c-texture'], 1, 'must contain at least one texture', '>=');
})
.then(() => amqp.publishAndWait(getMetadata, { username, audience }))
.get(audience)
Expand Down
12 changes: 5 additions & 7 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,12 @@ class Files extends Mservice {
delay: 100,
},
},
//
// specify these hooks to make appropriate actions work
// easiest option is to copy config from test folder
hooks: {
// specify to work with actions.get
'files:get:pre': [],
'files:info:pre': [],
'files:upload:pre': [],
'files:process:post': [],
},
// storage options
redis: {
Expand All @@ -99,10 +101,6 @@ class Files extends Mservice {
getMetadata: 'users.getMetadata',
updateMetadata: 'users.updateMetadata',
},
// function that is used in post-processing of uploaded files
process: function noop() {
return Promise.resolve();
},
};

constructor(opts = {}) {
Expand Down

0 comments on commit d250ada

Please sign in to comment.