Files
mtdb_movie/common/resources/client/uploads/uploader/strategy/upload-strategy.ts
maher 703f50a09d
Some checks failed
Build / run (push) Has been cancelled
first commit
2025-10-29 11:42:25 +01:00

21 lines
709 B
TypeScript
Executable File

import {BackendMetadata} from '../../types/backend-metadata';
import {Restrictions} from '../validate-upload';
import {FileEntry} from '../../file-entry';
import {UploadedFile} from '@common/uploads/uploaded-file';
export interface UploadStrategyConfig {
chunkSize?: number;
baseUrl?: string;
restrictions?: Restrictions;
showToastOnRestrictionFail?: boolean;
onProgress?: (progress: {bytesUploaded: number; bytesTotal: number}) => void;
onSuccess?: (entry: FileEntry, file: UploadedFile) => void;
onError?: (message: string | undefined | null, file: UploadedFile) => void;
metadata?: BackendMetadata;
}
export interface UploadStrategy {
start: () => void;
abort: () => Promise<void>;
}