Options
All
  • Public
  • Public/Protected
  • All
Menu

文件下载配置接口

Hierarchy

  • IFileDownloaderConfig

Implemented by

Index

Properties

Optional body

body: string | Document | Blob | ArrayBufferView | ArrayBuffer | FormData | URLSearchParams | ReadableStream<Uint8Array>

Optional contentType

contentType: string | false

content-type

Optional contentTypeDetermination

contentTypeDetermination: false | "header" | "signature" | "full"

Optional customFileSignatures

customFileSignatures: {}

Type declaration

  • [key: string]: string

Optional filename

filename: string

文件名

Optional forceDesktopMode

forceDesktopMode: boolean

Optional headers

headers: { name: string; value: string }[]

设置请求头

Optional method

请求的html方式 GET, POST

Optional nameCallback

nameCallback: (name: string) => string

Type declaration

    • (name: string): string
    • Parameters

      • name: string

      Returns string

Optional nativeFallbackOnError

nativeFallbackOnError: boolean

Optional onProcess

onProcess: (event: ProgressEvent<EventTarget>) => any

下载进度事件

Type declaration

    • (event: ProgressEvent<EventTarget>): any
    • Parameters

      • event: ProgressEvent<EventTarget>

      Returns any

Optional onloadstart

onloadstart: () => void

开始下载事件

Type declaration

    • (): void
    • Returns void

Optional timeout

timeout: number

超时

Optional url

url: string

下载地址

Optional withCredentials

withCredentials: boolean

Generated using TypeDoc