1
파일을 업로드 할 때 파일 이름이 반환되지만 모든 파일 이름을 배열에 저장하고 PHP 양식에 첨부하려고합니다. 이것은 내가 지금까지 가지고있는 것이다.업로드 된 파일을 배열에 저장
this.on("success", function(file, res) {
console.log(res.path);
file.newFileName = res;
$path = res.path;
// Create a hidden input to submit to the server:
$("#image").append($('<input type="hidden" ' +'name="files[]" ' +'value="' + res.path + '">'));
});
그리고 난 php 형식입니다. 하나의 파일 이름에 대해 작동하지만 현재 파일 이름 만 저장합니다.
{!! Form::hidden('image', '', array('id' => 'user-image')) !!}