download icon indicating copy to clipboard operation
download copied to clipboard

TypeError: invalid extended field value,when parse the filename

Open cobola opened this issue 7 years ago • 4 comments

TypeError: invalid extended field value

http://77fyok.com1.z0.glb.clouddn.com/avatar.jpg

the example url

cobola avatar Dec 04 '17 01:12 cobola

have the same problem.

ZhaZhengRefn avatar Feb 16 '18 09:02 ZhaZhengRefn

me too.

woshidamaomao avatar Sep 18 '19 05:09 woshidamaomao

Can you provide a code example?

kevva avatar Sep 18 '19 08:09 kevva

i have the same problem, here the code example

download('https://cdn.dancf.com/assets/place.png', 'dist/cdn')
    .then(res => {
        console.log(res);
    })
    .catch(err => {
        console.log(err);
    });

the error log:

TypeError: invalid extended field value
    at decodefield (xxxx/node_modules/content-disposition/index.js:269:11)
    at Function.parse (xxxx/node_modules/content-disposition/index.js:358:15)
    at getFilename (xxxx/node_modules/download/index.js:41:37)
    at pEvent.then.then.result (xxxxxx/node_modules/download/index.js:84:48)

ZengTianShengZ avatar Jan 19 '21 02:01 ZengTianShengZ