Multipart-HTTP-Konfiguration mit Zieladresse, Feldern, Headern und optionalen 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>
}| Feld | Bedeutung |
|---|---|
| url | Zieladresse des Uploadservers. |
| fieldName | Multipart-Feldname der Datei. |
| headers | Zusätzliche HTTP-Header. |
| withCredentials | Sendet Browser-Credentials bei XHR. |
| fields | Zusätzliche Multipart-Textfelder. |
| chunkSize | Chunkgröße in Bytes; muss positiv sein. |
| chunkFields | Felder je Chunk; Index ist nullbasiert. |
import type { TxHttpUploadConfig } from '@tekocloud.de/tecexpress'
const example: TxHttpUploadConfig = { url: '/api/upload', fieldName: 'file' }
console.log(example)