我正在尝试上传图片。上传效果很好,但是当我尝试上传jpg图片时,它将自动转换为jpeg。这是我的代码
if($request->hasFile('image'))
{
if($request->file('image')->store('public/gallery'))
{
$gallery = new Gallery();
$gallery->album_id = $request->album;
$gallery->photo = $request->image->hashName();
$gallery->save();
Session::flash('message','Success:: Image added to gallery');
Session::flash('alert','alert alert-success alert-dismissable');
return back();
}
else
{
Session::flash('message','Warning:: Failed to upload the image');
Session::flash('alert','alert alert-warning alert-dismissable');
return back()->withInput();
}
}
我真的在寻求帮助,谢谢