【发布时间】:2020-05-15 00:55:02
【问题描述】:
我尝试使用pionl/laravel-chunk-upload,但它不适用于 Laravel 7。我还尝试像以下那样组合块。
foreach ($chunks as $chunk) {
// open the chunk file
$file = fopen($chunk->getRealPath(), 'rb');
// read the data & store it in a variable (each chunk is 20mb)
$buff = fread($file, 2097152);
fclose($file);
// open the output file
$total = fopen($out, 'ab');
// write the data in it
fwrite($total, $buff);
fclose($total);
}
它将块合并为一个具有原始大小的文件,但它不起作用,并且丢失了视频或图像信息。
【问题讨论】:
-
感谢发送,但我设法让它工作。
标签: image video chunks laravel-7 dropzone