sendFile typo

This commit is contained in:
abalabahaha
2016-01-24 18:31:51 -08:00
parent 2c17eaed02
commit 4e9a11d7a9
2 changed files with 2 additions and 2 deletions

View File

@@ -578,7 +578,7 @@ var InternalClient = (function () {
if (!name) {
if (_file instanceof String || typeof _file === "string") {
name = require("path").basename(attachment);
name = require("path").basename(_file);
} else if (_file.path) {
// fs.createReadStream()'s have .path that give the path. Not sure about other streams though.
name = require("path").basename(_file.path);

View File

@@ -465,7 +465,7 @@ export default class InternalClient {
if (!name) {
if (_file instanceof String || typeof _file === "string") {
name = require("path").basename(attachment);
name = require("path").basename(_file);
} else if (_file.path) {
// fs.createReadStream()'s have .path that give the path. Not sure about other streams though.
name = require("path").basename(_file.path);