| 368 | */ | 368 | */ |
| 369 | export async function getChatInfo(pathToFile, additionalData = {}, isGroup = false) { | 369 | export async function getChatInfo(pathToFile, additionalData = {}, isGroup = false) { |
| 370 | return new Promise(async (res) => { | 370 | return new Promise(async (res) => { |
| 371 | const fileStream = fs.createReadStream(pathToFile); | | |
| 372 | const stats = await fs.promises.stat(pathToFile); | 371 | const stats = await fs.promises.stat(pathToFile); |
| 373 | const fileSizeInKB = `${(stats.size / 1024).toFixed(2)}kb`; | 372 | const fileSizeInKB = `${(stats.size / 1024).toFixed(2)}kb`; |
| 374 | | 373 | |