This commit is contained in:
@@ -6,6 +6,7 @@ import com.vrt.fileprotection.NoCopyCheckResult;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.core.io.FileSystemResource;
|
||||||
import org.springframework.core.io.Resource;
|
import org.springframework.core.io.Resource;
|
||||||
import org.springframework.core.io.UrlResource;
|
import org.springframework.core.io.UrlResource;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
@@ -338,8 +339,10 @@ public class ApiController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Path filePath = Paths.get(entityResponse.getProtectedFilePath());
|
Path filePath = Paths.get(entityResponse.getFilePath());
|
||||||
Resource resource = new UrlResource(filePath.toUri());
|
Resource resource = new FileSystemResource(filePath);
|
||||||
|
|
||||||
|
// Resource resource = new UrlResource(filePath.toUri());
|
||||||
|
|
||||||
if (!resource.exists()) {
|
if (!resource.exists()) {
|
||||||
Map<String, Object> errorData = new HashMap<>();
|
Map<String, Object> errorData = new HashMap<>();
|
||||||
|
|||||||
Reference in New Issue
Block a user