mirror of
https://github.com/strapi/strapi.git
synced 2025-09-08 08:08:18 +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 buffers = await uploadService.bufferize(files);
|
||||||
|
|
||||||
const enhancedFiles = buffers.map(file => {
|
const enhancedFiles = buffers.map(file => {
|
||||||
if (file.size > config.sizeLimit) {
|
if (parseFloat(file.size) > parseFloat(config.sizeLimit)) {
|
||||||
return ctx.badRequest(null, [
|
return ctx.badRequest(null, [
|
||||||
{
|
{
|
||||||
messages: [
|
messages: [
|
||||||
@ -208,10 +208,9 @@ const searchQueries = {
|
|||||||
return ({ id }) => {
|
return ({ id }) => {
|
||||||
return model
|
return model
|
||||||
.query(qb => {
|
.query(qb => {
|
||||||
qb.whereRaw('LOWER(hash) LIKE ?', [`%${id}%`]).orWhereRaw(
|
qb.whereRaw('LOWER(hash) LIKE ?', [
|
||||||
'LOWER(name) LIKE ?',
|
`%${id}%`,
|
||||||
[`%${id}%`]
|
]).orWhereRaw('LOWER(name) LIKE ?', [`%${id}%`]);
|
||||||
);
|
|
||||||
})
|
})
|
||||||
.fetchAll()
|
.fetchAll()
|
||||||
.then(results => results.toJSON());
|
.then(results => results.toJSON());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user