I'm doing a project of mine something like lets say youtube I've done the uploading videos part but I'm stuck on how can I playback those videos to Postman?
I've tried making the return type MultipartFile class and just returning the file but it doesn't seems to work.
@RestController
public class VideoController {
@PostMapping(value = "/upload")
public void uploadVideo(@RequestParam("video") MultipartFile file) throws IOException {
byte[] bytes = file.getBytes();
File newVideo = new File("D:\\test\\" + file.getName() + ".mp4");
FileOutputStream fos = new FileOutputStream(newVideo);
fos.write(bytes);
}
}