나는 약간의 조언을 얻을 수 있는지 궁금합니다.jQuery 업로드 실행 중이지만 파일을 업로드하지 않음
사용자가 동일한 페이지에있는 동안 jquery를 사용하여 파일을 업로드하려고합니다.
저는 무엇이든 시도해 봅니다. 나는 어떤 사람이 외모를 가질 수 있는지, 그리고 어디서 잘못되었는지 말해 줄 수 있는지 궁금해하고있었습니다.
내 HTML은
<form id="import" enctype="multipart/form-data" action="/ajax/postimport" method="POST">
<div class="form-group">
<input type="file" name="filename" id="filename" />
</div>
<button type="button" id="importSave">Import</button>
</form>
이 Laravel 4
if (Input::hasFile('filename')) {
$file = Input::file('filename');
$destPath = public_path() . '/uploads/';
$filename = str_random(10) . '_' . $file->getClientOriginalName();
$uploadSuccess = $file->move($destPath, $filename);
}