sa
このコミットが含まれているのは:
コミット
3f9412c5b5
|
@ -43,7 +43,7 @@ class MeetingsController extends Controller {
|
|||
|
||||
// ミームタイプ
|
||||
//// 画像
|
||||
if (substr($r->pdf, -5) != '.jpeg' || substr($r->pdf, -4) != '.jpg' || substr($r->pdf, -4) != '.png' || substr($r->pdf, -4) != '.gif') {
|
||||
if (substr($r->image, -5) == '.jpeg' || substr($r->image, -4) == '.jpg' || substr($r->image, -4) == '.png' || substr($r->image, -4) == '.gif') {
|
||||
Validator::extend('image_meme', function ($attribute, $value, $params, $validator) {
|
||||
try {
|
||||
$ok = true;
|
||||
|
@ -138,17 +138,19 @@ class MeetingsController extends Controller {
|
|||
$meeting = Meeting::create($insert);
|
||||
|
||||
foreach ($r->image as $img) {
|
||||
$ext = explode('/', mime_content_type($img))[1];
|
||||
$filename = uniqid() . '.'.$ext;
|
||||
$image = base64_decode(substr($img, strpos($img, ',') + 1));
|
||||
Storage::disk('public')->put($filename, $image);
|
||||
|
||||
$insert_image = [
|
||||
'meeting_id' => (int)$meeting->id,
|
||||
'image' => '/storage/'.$filename,
|
||||
];
|
||||
|
||||
MeetingImage::create($insert_image);
|
||||
if (substr($r->image, -5) != '.jpeg' && substr($r->image, -4) != '.jpg' && substr($r->image, -4) != '.png' && substr($r->image, -4) != '.gif') {
|
||||
$ext = explode('/', mime_content_type($img))[1];
|
||||
$filename = uniqid() . '.'.$ext;
|
||||
$image = base64_decode(substr($img, strpos($img, ',') + 1));
|
||||
Storage::disk('public')->put($filename, $image);
|
||||
|
||||
$insert_image = [
|
||||
'meeting_id' => (int)$meeting->id,
|
||||
'image' => '/storage/'.$filename,
|
||||
];
|
||||
|
||||
MeetingImage::create($insert_image);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (json_decode($r->children) as $child) {
|
||||
|
|
新しいイシューから参照