test
This commit is contained in:
parent
d40f38fbe3
commit
1e29de8b17
@ -174,13 +174,14 @@ module.exports = (lib) => {
|
|||||||
|
|
||||||
dat
|
dat
|
||||||
.on('finish', () => {
|
.on('finish', () => {
|
||||||
|
lib.log('bin im Finishevent gelandet, keine Ahnung wieso.');
|
||||||
var size = dat.bytesWritten;
|
var size = dat.bytesWritten;
|
||||||
dat.end();
|
dat.end();
|
||||||
if(size > cfg.maxFileSize)
|
if(size > cfg.maxFileSize)
|
||||||
cb({ success: false, file: tmpdest, msg: 'f0ck! your file is too big (~'+lib.formatSize(size)+'), max '+lib.formatSize(cfg.maxFileSize)+' allowed' });
|
cb({ success: false, file: tmpdest, msg: 'f0ck! your file is too big (~'+lib.formatSize(size)+'), max '+lib.formatSize(cfg.maxFileSize)+' allowed' });
|
||||||
else {
|
else {
|
||||||
fs.stat('./b/' + tmpdest, (err, stat) => {
|
fs.stat('./b/' + tmpdest, (err, stat) => {
|
||||||
if(err === null) {
|
if(!err) {
|
||||||
lib.getCheckSum('./b/' + tmpdest, (cbcs) => {
|
lib.getCheckSum('./b/' + tmpdest, (cbcs) => {
|
||||||
lib.checkRepostCheckSum(cbcs, (cbcrcs) => {
|
lib.checkRepostCheckSum(cbcs, (cbcrcs) => {
|
||||||
if(cbcrcs === true) {
|
if(cbcrcs === true) {
|
||||||
@ -195,9 +196,6 @@ module.exports = (lib) => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
cb({ success: false, file: tmpdest, msg: 'keine Ahnung' });
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user