Closed jumpersib closed 1 year ago
breaks the video, please add a check for the correct format (only for images), something like this:
const allowType = ['JPEG', 'PNG', 'GIF', 'SVG', 'TIFF', 'ICO', 'DVU'];
// firstSegment this is a variable from your code if(!allowType.includes(firstSegment.split('.').pop().toUpperCase())) { await next() return }
i mean admin panel (500th error)
breaks the video, please add a check for the correct format (only for images), something like this:
const allowType = ['JPEG', 'PNG', 'GIF', 'SVG', 'TIFF', 'ICO', 'DVU'];
// firstSegment this is a variable from your code if(!allowType.includes(firstSegment.split('.').pop().toUpperCase())) { await next() return }