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();
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.
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.jsto : (in the viedo tag add ‘src="{data}"’)
<video class="kv-preview-data" width="{width}" height="{height}" controls src="{data}">Ok. Everything is solved.