1
嗨,請幫我擺脫這個問題。 這裏我在春季寫我的服務。我正嘗試將大型視頻文件上傳到服務器上。爲此,我將視頻分成幾部分(每個都有1 MB)作爲塊。而他們的本地路徑如下如何處理視頻上傳到服務器上的代碼塊和春季寫的服務器代碼mvc
[ /storage/emulated/0/1493357699.mp4.001,
/storage/emulated/0/1493357699.mp4.002,
/storage/emulated/0/1493357699.mp4.003,
/storage/emulated/0/1493357699.mp4.004,
/storage/emulated/0/1493357699.mp4.005,
/storage/emulated/0/1493357699.mp4.006,
/storage/emulated/0/1493357699.mp4.007,
/storage/emulated/0/1493357699.mp4.008 ]
我寫的代碼在服務器端,如下
@RequestMapping(value = "/replyToQuestionAns", method = RequestMethod.POST, headers = "content-type=multipart/*", produces = { "application/json" })
@ResponseBody
public StatusObject replyToQuestionAns(
@RequestParam Map<String, String> requestParams,
@RequestParam("file") MultipartFile[] files) throws Exception {
return null;
}
我得到的所有數據塊(分裂)文件,但我不知道如何處理它們。 我試圖合併所有分塊的視頻。但我不知道如何合併它們。 請幫幫我。
您可能重複使用的解決方案:HTTP ://stackoverflow.com/questions/26711526/streaming-large-files-with-spring-mvc和http://stackoverflow.com/questions/37870989/spring-how-to-stream-large-multipart-file-uploads -to-數據庫,而無需貯藏 –