Fixed incorrect type

pull/126/head
tycrek 2 years ago
parent 89956a28cf
commit 612f86cb12
No known key found for this signature in database
GPG Key ID: 25D74F3943625263

@ -12,5 +12,5 @@ export default (file: FileData): Promise<string> =>
toArray((fs.createReadStream(file.path)))
.then((parts: any[]) => Buffer.concat(parts.map((part: any) => (Buffer.isBuffer(part) ? part : Buffer.from(part)))))
.then((buf: Buffer) => crypto.createHash('sha1').update(buf).digest('hex')) // skipcq: JS-D003
.then((hash: String) => log.debug(`Hash for ${file.originalname}`, hash, 'SHA1, hex').callback(resolve, hash))
.then((hash: string) => log.debug(`Hash for ${file.originalname}`, hash, 'SHA1, hex').callback(resolve, hash))
.catch(reject));

Loading…
Cancel
Save