package ru.soune.nocopy.service.file;

import org.springframework.web.multipart.MultipartFile;
import ru.soune.nocopy.dto.file.UploadProgressResponse;
import ru.soune.nocopy.entity.file.FileStatus;
import ru.soune.nocopy.entity.file.FileUploadSession;

import java.io.IOException;

public interface FileUploadService {
    FileUploadSession initUpload(Long userId, String fileName,
                                 String fileType, String extension, long fileSize);

    void handleExpiredSession(FileUploadSession session);

    void cancelUpload(String uploadId);

    UploadProgressResponse uploadChunk(String uploadId, Integer chunkNumber, MultipartFile chunkFile, Integer findSimilar);

    UploadProgressResponse getUploadProgress(String uploadId);

    void completeFileProcessingAsync(FileUploadSession session, FileStatus status);
}
