Subversion Repositories SmartDukaan

Rev

Rev 33465 | Rev 33750 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 33465 Rev 33467
Line 178... Line 178...
178
        model.addAttribute("response1", mvcResponseSender.createResponseString(true));
178
        model.addAttribute("response1", mvcResponseSender.createResponseString(true));
179
        return "response";
179
        return "response";
180
    }
180
    }
181
 
181
 
182
    @GetMapping("/bulkVendorCatalogPricing/downloadReferenceFile")
182
    @GetMapping("/bulkVendorCatalogPricing/downloadReferenceFile")
183
    public ResponseEntity<?> downloadDummyFile() throws IOException {
183
    public ResponseEntity<?> downloadReferenceFile() throws IOException {
184
        ClassPathResource dummyFile = new ClassPathResource("vendor-catalog-pricing-file.xlsx"); // Make sure the file is in the resources folder
184
        ClassPathResource dummyFile = new ClassPathResource("vendor-catalog-pricing-file.xlsx"); // Make sure the file is in the resources folder
185
        return ResponseEntity.ok()
185
        return ResponseEntity.ok()
186
                .header(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=dummy-file.xlsx")
186
                .header(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=dummy-file.xlsx")
187
                .contentType(MediaType.APPLICATION_OCTET_STREAM)
187
                .contentType(MediaType.APPLICATION_OCTET_STREAM)
188
                .body(new InputStreamResource(dummyFile.getInputStream()));
188
                .body(new InputStreamResource(dummyFile.getInputStream()));