SUPPORT-8818:fix from review

This commit is contained in:
adel.kalimullin 2024-12-23 14:00:03 +03:00
parent 574cfe97b0
commit b3a32e77d7

View file

@ -6,16 +6,18 @@ import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import ru.micord.av.service.exception.AvException;
/**
* @author Adel Kalimullin
*/
@Service
public class FileManager {
private static final Logger LOGGER = LoggerFactory.getLogger(FileManager.class);
@Value("${file.upload.directory}")
public String uploadDirectory;
@ -35,7 +37,7 @@ public class FileManager {
Files.delete(file.toPath());
}
catch (IOException e) {
throw new AvException("Error deleting temporary file: " + file.getAbsolutePath(), e);
LOGGER.warn("Error deleting file: " + file.getAbsolutePath());
}
}
}