StorageService.java 571 B

12345678910111213141516171819202122232425262728
  1. package cn.minbb.evaluation.stroage;
  2. import org.springframework.core.io.Resource;
  3. import org.springframework.web.multipart.MultipartFile;
  4. import java.nio.file.Path;
  5. import java.util.stream.Stream;
  6. public interface StorageService {
  7. void init();
  8. void store(MultipartFile file);
  9. void delete(String fileName);
  10. void deleteAll();
  11. Path load(String fileName);
  12. Stream<Path> loadAll();
  13. Resource loadAsResource(String fileName);
  14. void storeAvatar(MultipartFile file, String filename);
  15. Resource loadAvatarsAsResource(String filename);
  16. }