Skip to content

Commit

Permalink
whitespaces support
Browse files Browse the repository at this point in the history
  • Loading branch information
Serhii committed Apr 27, 2021
1 parent 684b6ea commit 6d66ebe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -795,9 +795,9 @@ function uploadPath(baseDir, filename) {
}

function parseFilename(headerValue) {
var m = headerValue.match(/\bfilename="(.*?)"($|; )/i);
var m = headerValue.match(/\bfilename="((.|\s)*?)"($|; )/i);
if (!m) {
m = headerValue.match(/\bfilename\*=utf-8''(.*?)($|; )/i)
m = headerValue.match(/\bfilename\*=utf-8''((.|\s)*?)($|; )/i)
if (m) {
m[1] = decodeURI(m[1]);
} else {
Expand Down

0 comments on commit 6d66ebe

Please sign in to comment.