我遇到問題。我使用Bootstrap fileinput上傳52個帶有異步AJAX請求的圖像。它會上傳90%的文件,並在少數圖像上隨機給出錯誤。Laravel 5.3使用AJAX上傳52張圖片錯誤
這是錯誤:
SQLSTATE[HY000] [1045] Access denied for user 'forge'@'localhost' (using password: NO)
上傳功能:
public function uploadTemp360(Request $request)
{
$image = $request->file('view360s');
$fileName = $image->getClientOriginalName().'.'.$image->getClientOriginalExtension();
$path = public_path().'/uploads/temp/';
if ($image->isValid()){
$image->move($path, $fileName);
}
return [
'initialPreview' => [
"<img style='height:160px' src='/uploads/temp/".$fileName."' class='file-preview-image'>",
],
'initialPreviewConfig' => [
['caption' => $fileName, 'width' => '120px', 'url' => route('admin.products.delete-temp-360'), 'key' => $fileName, 'size' => \File::size($path.$fileName)],
],
'append' => true,
'filename' => $fileName,
];
}
我不知道這是怎麼回事?如何導致DB錯誤通過運行此代碼...
我在laravel中發現此錯誤: production.ERROR: exception 'RuntimeException' with message 'The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths.'
您的代碼的哪部分是您訪問數據庫? – Hokusai
沒有數據庫連接...:/ – Buglinjo