Added password field
- Added download error modal - Added password field show logic - Redesigned UI
This commit is contained in:
@ -75,10 +75,13 @@ public class Download extends ApiRestController {
|
||||
public ResponseEntity<Object> getDownloadInfo(@RequestParam String fileId) {
|
||||
FileUpload fileUpload = fileService.getFileUploadByFileId(fileId);
|
||||
|
||||
boolean downloadable = !fileUpload.isSingleDownload() || fileUpload.getDownloadCount() == 0;
|
||||
|
||||
Map<String, Object> response = new HashMap<>();
|
||||
response.put("fileId", fileUpload.getFileId());
|
||||
response.put("passwordProtected", fileUpload.isPasswordProtected());
|
||||
response.put("singleDownload", fileUpload.isSingleDownload());
|
||||
response.put("downloadable", downloadable);
|
||||
|
||||
return new ResponseEntity<>(response, HttpStatus.OK);
|
||||
}
|
||||
|
Reference in New Issue
Block a user