add another filetype to the whitelist

This commit is contained in:
Pierce 2023-11-05 21:50:03 -05:00
parent 3a2b30e4e0
commit b0288d73ae
No known key found for this signature in database
GPG Key ID: EC79465B0E865E47

View File

@ -0,0 +1,22 @@
-- https://www.ftyps.com/what.html
CFCHTTP.FileTypes.FTYP = {
name = "ftyp",
}
local FTYP = CFCHTTP.FileTypes.FTYP
---@param body string
---@return boolean
function FTYP.IsFileData( body )
body = string.sub( body, 5 ) -- discord size bytes
if not string.StartsWith( body, "ftyp" ) then return false end
return true
end
---@param _ string
---@return string[] urls
---@return string|nil error
function FTYP.GetURLSFromData( _ )
-- we want to ignore urls in FTYP containers
return {}, nil
end