mirror of https://github.com/pixelfed/pixelfed.git
Update ApiV1Controller, fix null caption on media bug
This commit is contained in:
parent
9b8e7ff628
commit
424f0271c3
|
@ -1878,7 +1878,7 @@ class ApiV1Controller extends Controller
|
|||
$media->original_sha256 = $hash;
|
||||
$media->size = $photo->getSize();
|
||||
$media->mime = $mime;
|
||||
$media->caption = $request->input('description');
|
||||
$media->caption = $request->input('description') ?? "";
|
||||
$media->filter_class = $filterClass;
|
||||
$media->filter_name = $filterName;
|
||||
if ($license) {
|
||||
|
@ -2106,7 +2106,7 @@ class ApiV1Controller extends Controller
|
|||
$media->original_sha256 = $hash;
|
||||
$media->size = $photo->getSize();
|
||||
$media->mime = $mime;
|
||||
$media->caption = $request->input('description');
|
||||
$media->caption = $request->input('description') ?? "";
|
||||
$media->filter_class = $filterClass;
|
||||
$media->filter_name = $filterName;
|
||||
if ($license) {
|
||||
|
|
|
@ -119,10 +119,11 @@ class ComposeController extends Controller
|
|||
$media->media_path = $path;
|
||||
$media->original_sha256 = $hash;
|
||||
$media->size = $photo->getSize();
|
||||
$media->caption = "";
|
||||
$media->mime = $mime;
|
||||
$media->filter_class = $filterClass;
|
||||
$media->filter_name = $filterName;
|
||||
$media->version = 3;
|
||||
$media->version = '3';
|
||||
$media->save();
|
||||
|
||||
$preview_url = $media->url().'?v='.time();
|
||||
|
|
Loading…
Reference in New Issue