Skip to content

Commit 0cd101c

Browse files
authored
Fix
1 parent 9ebce5b commit 0cd101c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/form_data.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ FormData.prototype._getContentDisposition = function(value, options) {
214214
// custom filename takes precedence
215215
// fs- and request- streams have path property
216216
// formidable and the browser add a name property.
217-
var filename = options.filename || path.basename(value.name || value.path);
217+
var filename = options.filename || path.basename(value.name || value.path || '');
218218

219219
// or try http response
220220
if (!filename && value.readable && value.hasOwnProperty('httpVersion')) {

0 commit comments

Comments
 (0)