Skip to content

Commit 2e2726b

Browse files
committed
removed query params
1 parent 948a0e3 commit 2e2726b

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

index.js

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,6 @@ module.exports = (server, options, next) => {
3434
validate: {
3535
payload: {
3636
file: Joi.any().required()
37-
},
38-
query: {
39-
quality: Joi.number(),
40-
x: Joi.number(),
41-
y: Joi.number(),
42-
height: Joi.number(),
43-
width: Joi.number(),
44-
gravity: Joi.string()
4537
}
4638
},
4739
},
@@ -57,22 +49,6 @@ module.exports = (server, options, next) => {
5749
return reply(Boom.unsupportedMediaType('content-type not allowed'));
5850
}
5951
file.path = file.hapi.filename;
60-
// pass any crop/compress options:
61-
const query = request.query;
62-
options.quality = query.quality ? query.quality : options.quality;
63-
if (query.width && query.height) {
64-
options.size = [query.width, query.height];
65-
}
66-
if (query.x && query.y) {
67-
options.position = [query.x, query.y];
68-
}
69-
options.gravity = query.gravity;
70-
if (query.acl) {
71-
options.acl = query.acl;
72-
}
73-
if (query.host) {
74-
options.host = query.host;
75-
}
7652
// call s3put to handle the upload:
7753
s3put(file, options, (err, response) => {
7854
if (err) {

0 commit comments

Comments
 (0)