Skip to content

downloadByData

通过blob 下载文件

Demo

ts
import { 
downloadByData
} from '@vill-v/broswer'
downloadByData
({
data
: new
File
(),
target
: '_blank',
filename
: 'xxx.pdf',
})

DTS

ts
import {
LinkTargetContext
} from '@vill-v/ts'
declare function
downloadByData
({
data
,
target
,
filename
,
mime
,
bom
,}: {
data
:
BlobPart
;
target
?:
LinkTargetContext
;
filename
: string;
mime
?: string;
bom
?:
BlobPart
;
}): void;

Released under the MIT License.