UNPKG

react-native-chunk-upload

Version:

A package to bring Chunked File Upload / Resumable File Upload into React Native. Split a large file into multiple smaller pieces then upload them without worrying about network disconnection, even if it happens React Native Chunk Upload will only upload

46 lines (38 loc) 979 B
export as namespace ChunkUploadLib; export = ChunkUpload; declare class ChunkUpload { constructor(props: ChunkUpload.Props); digIn(Event: ChunkUpload.Event): void; } declare namespace ChunkUpload { export interface Props { path: string; size: number; fileName: string; fileSize: number; } export type Event = ( file: File, next: () => void, retry: () => void, unlink: (path: string) => void ) => void; export interface File { path: string; headers: Header; blob: Blob; } export interface Header { "x-chunk-number": number; "x-chunk-total-number": number; "x-chunk-size": number; "x-file-name": string; "x-file-size": number; "x-file-identity": string; } export interface Blob { name: string; type: string; uri: string; } }