mirror of
https://github.com/strapi/strapi.git
synced 2025-09-06 23:28:02 +00:00
Signed-off-by: Edaly Ahmed <ahmed.edaly@oyez.fr>
signing off
This commit is contained in:
parent
9c68285594
commit
67f4712fa7
@ -55,7 +55,7 @@ module.exports = {
|
||||
const buffers = await uploadService.bufferize(files);
|
||||
|
||||
const enhancedFiles = buffers.map(file => {
|
||||
if (file.size > config.sizeLimit) {
|
||||
if (parseFloat(file.size) > parseFloat(config.sizeLimit)) {
|
||||
return ctx.badRequest(null, [
|
||||
{
|
||||
messages: [
|
||||
@ -208,10 +208,9 @@ const searchQueries = {
|
||||
return ({ id }) => {
|
||||
return model
|
||||
.query(qb => {
|
||||
qb.whereRaw('LOWER(hash) LIKE ?', [`%${id}%`]).orWhereRaw(
|
||||
'LOWER(name) LIKE ?',
|
||||
[`%${id}%`]
|
||||
);
|
||||
qb.whereRaw('LOWER(hash) LIKE ?', [
|
||||
`%${id}%`,
|
||||
]).orWhereRaw('LOWER(name) LIKE ?', [`%${id}%`]);
|
||||
})
|
||||
.fetchAll()
|
||||
.then(results => results.toJSON());
|
||||
|
Loading…
x
Reference in New Issue
Block a user