package vn.azteam.tpf.service;

import org.springframework.core.io.Resource;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

@Service
public interface FileStorageService {


    /**
     *  Store upload files
     * @param itemTimeLineId
     * @param files
     * @return
     */
    String storeFiles(String itemTimeLineId, MultipartFile[] files);


    /**
     *  Remove uploaded files
     * @param itemTimeLineId
     * @param fileNames
     * @return
     */
    Boolean removeFiles(String itemTimeLineId, String[] fileNames);

    /**
     *  Remove uploaded files
     * @param itemTimeLineId
     * @param fileName
     * @return
     */
    Boolean removeFile(String itemTimeLineId, String fileName);

    /**
     * Load file as resource
     * @param itemTimeLineId
     * @param fileName
     * @return
     */
    Resource loadFileAsResource(String itemTimeLineId, String fileName);
}
