moar mimetypes!
This commit is contained in:
parent
dda1c587e9
commit
e0ff84187b
|
@ -185,10 +185,12 @@ module.exports = (lib) => {
|
|||
lib.checkRepostCheckSum(cbcs, (cbcrcs) => {
|
||||
if(cbcrcs === true) {
|
||||
var mime = fileType(readChunk.sync('./b/' + tmpdest, 0, 262));
|
||||
info.ext = mime.ext;
|
||||
info.mime = mime.mime;
|
||||
if(lib.cfg.main.allowedMimes.hasOwnProperty(mime.mime) || info.type === 'soundcloud')
|
||||
cb({ success: true, info: info, size: size, file: './b/' + tmpdest, checksum: cbcs });
|
||||
else
|
||||
cb({ success: false, file: tmpdest, msg: 'lol, go f0ck yourself ('+JSON.stringify(mime)+')' });
|
||||
cb({ success: false, file: tmpdest, msg: 'lol, go f0ck yourself ('+mime.mime+')' });
|
||||
}
|
||||
else
|
||||
cb({ success: false, file: tmpdest, msg: 'repost motherf0cker: '+lib.cfg.main.url+'/'+cbcrcs });
|
||||
|
|
Loading…
Reference in New Issue
Block a user