我遇到问题。我使用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