mirror of
https://github.com/directus/directus.git
synced 2026-01-31 14:38:14 -05:00
Trim val before check
h/t @aidenfoxx
This commit is contained in:
@@ -37,9 +37,9 @@ const multipartHandler = asyncHandler(async (req, res, next) => {
|
||||
let fileCount = 0;
|
||||
|
||||
busboy.on('field', (fieldname: keyof File, val) => {
|
||||
if (val === 'null') val = null;
|
||||
if (val === 'false') val = false;
|
||||
if (val === 'true') val = true;
|
||||
if (typeof val === 'string' && val.trim() === 'null') val = null;
|
||||
if (typeof val === 'string' && val.trim() === 'false') val = false;
|
||||
if (typeof val === 'string' && val.trim() === 'true') val = true;
|
||||
|
||||
if (fieldname === 'storage') {
|
||||
disk = val;
|
||||
|
||||
Reference in New Issue
Block a user