I read that I should not store videos in the database. I should store them on the file system and save in the database their name. I read some topics like this: https://softwareengineering.stackexchange.com/a/345736
So I have my video files in a folder in my app called videoDirs
. I would like somehow to return them to the client.
My idea is to return multiple video files for an user using an array of MultiPartFile
and receive them in AngularJS for the frontend.
Should I do something like this?
@RequestMapping(value = "/download-video", method = RequestMethod.GET)
public MultipartFile[] handleDownloadVideoRequest(@RequestParam String username) {
return null;
}
Can you provide me some examples?