Laravel-admin: Cant play preview mp3 file in edit mode

Created on 5 Aug 2018  ·  3Comments  ·  Source: z-song/laravel-admin

  • Laravel Version: 5.6.*
  • PHP Version: 7.1.3
  • Laravel-admin: ^1.5

Description:

I managed to upload a mp3 to field file , when in create mode, i can listen the mp3
but when i open edit mode, can't listen to it anymore

$form->file('audio','Question Audio')->options([
                    'previewFileType'=>'audio',
                    'initialPreviewFileType'=>'audio',
                ])->uniqueName();

Steps To Reproduce:

wontfix

Most helpful comment

I can't preview it too. So, I tried to change it to :

options(['initialPreviewFileType' => 'video']);

I still can't preview, but it is very similar to the create. And, I modified the following file

\public\vendor\laravel-admin\bootstrap-fileinput\js\fileinput.min.js

to : (in the viedo tag add ‘src="{data}"’)

<video class="kv-preview-data" width="{width}" height="{height}" controls src="{data}">

Ok. Everything is solved.

All 3 comments

I can't preview it too. So, I tried to change it to :

options(['initialPreviewFileType' => 'video']);

I still can't preview, but it is very similar to the create. And, I modified the following file

\public\vendor\laravel-admin\bootstrap-fileinput\js\fileinput.min.js

to : (in the viedo tag add ‘src="{data}"’)

<video class="kv-preview-data" width="{width}" height="{height}" controls src="{data}">

Ok. Everything is solved.

@manzhouya you saved the day. Thank you.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings