Multipart HTTP configuration with a destination, fields, headers and optional chunks.
interface TxHttpUploadConfig {
url: string
fieldName?: string
headers?: Record<string, string>
withCredentials?: boolean
fields?: Record<string, string>
chunkSize?: number
chunkFields?: (
file: File,
index: number,
count: number,
) => Record<string, string>
}| Field | Meaning |
|---|---|
| url | Upload server destination. |
| fieldName | Multipart file field name. |
| headers | Additional HTTP headers. |
| withCredentials | Sends browser credentials with XHR. |
| fields | Additional multipart text fields. |
| chunkSize | Chunk size in bytes; must be positive. |
| chunkFields | Fields per chunk; index is zero-based. |
import type { TxHttpUploadConfig } from '@tekocloud.de/tecexpress'
const example: TxHttpUploadConfig = { url: '/api/upload', fieldName: 'file' }
console.log(example)