patch prod
This commit is contained in:
@@ -2,6 +2,7 @@ package fr.eni.enchere.bll;
|
|||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
|
|
||||||
@@ -9,14 +10,9 @@ import java.nio.file.Paths;
|
|||||||
public class FileService {
|
public class FileService {
|
||||||
|
|
||||||
public boolean fileExists(String filePath) {
|
public boolean fileExists(String filePath) {
|
||||||
if (Files.exists(Paths.get("src/main/resources/static"+filePath)) || Files.exists(Paths.get(filePath))){
|
filePath = "src/main/resources/static" + filePath;
|
||||||
return true;
|
File file = new File(filePath).getAbsoluteFile();
|
||||||
}else{
|
return file.exists();
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// src/main/resources/static/images/articles/12.jpg
|
|
||||||
BIN
src/main/resources/static/images/articles/121.jpg
Normal file
BIN
src/main/resources/static/images/articles/121.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 339 KiB |
Reference in New Issue
Block a user