Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
File Upload
  • Loading branch information
Avinash Yachamaneni committed Nov 9, 2018
commit 616e9a5ee42c0df558a7761f815a3bf8e9095f1b
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,16 @@ public class FileController {

@PostMapping("/uploadFile")
public UploadFileResponse uploadFile(@RequestParam("file") MultipartFile file) {
// String fileName = fileStorageService.storeFile(file);
//
//// String fileDownloadUri = Paths.get("/Users", "TestApk", fileName).toString();
// String fileDownloadUri = System.getProperty("user.dir".toString());
//
// return new UploadFileResponse(fileName, fileDownloadUri, file.getContentType(), file.getSize());
String fileName = fileStorageService.storeFile(file);

String fileDownloadUri = Paths.get("/Users", "TestApk", fileName).toString();
String fileDownloadUri = ServletUriComponentsBuilder.fromCurrentContextPath().path("/downloadFile/")
.path(fileName).toUriString();

return new UploadFileResponse(fileName, fileDownloadUri, file.getContentType(), file.getSize());
}
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/static/css/jenkins-material-theme.css

Large diffs are not rendered by default.