song not play in laravel website ? error in console is ( Failed to load resource: the server responded with a status of 404 () )Retrieve and play mp3 files from mySQL using Javascript/PHP404 on Laravel Resource RouteVideo uploading not working in laravel 5angularjs:Failed to load resource: the server responded with a status of 400 (Bad Request)Laravel: js/app.js - Source-Map-Error :request failed with status 404Failed to load resource: the server responded with a status of 405 ()Laravel 5.6 - Route api resources 404 errorFailed to load resource: the server responded with a status of 500 (Internal Server Error) in ajax with laravelthe server responded with a status of 500 (Internal Server Error) in laravel 5.7Laravel 5.5 Backpack CRUD gives 404 Failed to Load Resource
Create a list of all possible Boolean configurations of three constraints
What does i386 mean on macOS Mojave?
How to select certain lines (n, n+4, n+8, n+12...) from the file?
Why is this int array not passed as an object vararg array?
How to cope with regret and shame about not fully utilizing opportunities during PhD?
Size of a folder with du
How does noise-cancellation work in Mac laptops?
How to get reference to Component from inside an event method
How can dragons propel their breath attacks to a long distance
How are one-time password generators like Google Authenticator different from having two passwords?
Meaning of「〜てみたいと思います」
Front derailleur hard to move due to gear cable angle
On studying Computer Science vs. Software Engineering to become a proficient coder
What are the components of a legend (in the sense of a tale, not a figure legend)?
Plastic-on-plastic lubricant that wont leave a residue?
Word in Mandarin that is often used that sounds like "jigga"?
Smallest Guaranteed hash collision cycle length
Definition of Newton's first law
Why was Endgame Thanos so different than Infinity War Thanos?
51% attack - apparently very easy? refering to CZ's "rollback btc chain" - How to make sure such corruptible scenario can never happen so easily?
What's the difference between a Bunsen burner and a gas stove?
On what legal basis did the UK remove the 'European Union' from its passport?
Word for being out at night during curfew
How do I tell my supervisor that he is choosing poor replacements for me while I am on maternity leave?
song not play in laravel website ? error in console is ( Failed to load resource: the server responded with a status of 404 () )
Retrieve and play mp3 files from mySQL using Javascript/PHP404 on Laravel Resource RouteVideo uploading not working in laravel 5angularjs:Failed to load resource: the server responded with a status of 400 (Bad Request)Laravel: js/app.js - Source-Map-Error :request failed with status 404Failed to load resource: the server responded with a status of 405 ()Laravel 5.6 - Route api resources 404 errorFailed to load resource: the server responded with a status of 500 (Internal Server Error) in ajax with laravelthe server responded with a status of 500 (Internal Server Error) in laravel 5.7Laravel 5.5 Backpack CRUD gives 404 Failed to Load Resource
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
Controller code
for storing mp3 files
public function store(Request $request)
$this->validate($request,[
'audio' => 'required'
]);
if($request->hasFile('audio'))
$fileNameWithExt = Input::file('audio')->getClientOriginalName();
$fileName = pathinfo($fileNameWithExt, PATHINFO_FILENAME);
//$extention = Input::file('audio')->getClientOrignalExtention();
$extention = File::extension($fileName);
$fileNameToStore = $fileName.'_'.time().'.'.$extention;
$path = $request->file('audio')->store('audios');
$pdf = Audio::create([
'file' => $path,
'owner_id' => Auth::user()->id,
]);
if($pdf)
return redirect('/audios')->with('add_success', 'File add successfully ');
else
$fileNameToStore ='nothing.mp3';
to get mp3
file:
public function getAudio($id)
$file = Audio::findOrFail($id);
return view('admin.audio.playsong',compact('file'));
View code
for playing mp3
file on view :
<div class="col-md-12">
@if($file)
<audio controls style="height:54px;">
<source src="asset('/storage/'.$file->file)" type="audio/mpeg">
</audio>
@endif
</div>
laravel-5 mp3 playback can-bus
add a comment |
Controller code
for storing mp3 files
public function store(Request $request)
$this->validate($request,[
'audio' => 'required'
]);
if($request->hasFile('audio'))
$fileNameWithExt = Input::file('audio')->getClientOriginalName();
$fileName = pathinfo($fileNameWithExt, PATHINFO_FILENAME);
//$extention = Input::file('audio')->getClientOrignalExtention();
$extention = File::extension($fileName);
$fileNameToStore = $fileName.'_'.time().'.'.$extention;
$path = $request->file('audio')->store('audios');
$pdf = Audio::create([
'file' => $path,
'owner_id' => Auth::user()->id,
]);
if($pdf)
return redirect('/audios')->with('add_success', 'File add successfully ');
else
$fileNameToStore ='nothing.mp3';
to get mp3
file:
public function getAudio($id)
$file = Audio::findOrFail($id);
return view('admin.audio.playsong',compact('file'));
View code
for playing mp3
file on view :
<div class="col-md-12">
@if($file)
<audio controls style="height:54px;">
<source src="asset('/storage/'.$file->file)" type="audio/mpeg">
</audio>
@endif
</div>
laravel-5 mp3 playback can-bus
You are playing MP3 over CAN bus? That's new...
– Lundin
Mar 25 at 7:28
add a comment |
Controller code
for storing mp3 files
public function store(Request $request)
$this->validate($request,[
'audio' => 'required'
]);
if($request->hasFile('audio'))
$fileNameWithExt = Input::file('audio')->getClientOriginalName();
$fileName = pathinfo($fileNameWithExt, PATHINFO_FILENAME);
//$extention = Input::file('audio')->getClientOrignalExtention();
$extention = File::extension($fileName);
$fileNameToStore = $fileName.'_'.time().'.'.$extention;
$path = $request->file('audio')->store('audios');
$pdf = Audio::create([
'file' => $path,
'owner_id' => Auth::user()->id,
]);
if($pdf)
return redirect('/audios')->with('add_success', 'File add successfully ');
else
$fileNameToStore ='nothing.mp3';
to get mp3
file:
public function getAudio($id)
$file = Audio::findOrFail($id);
return view('admin.audio.playsong',compact('file'));
View code
for playing mp3
file on view :
<div class="col-md-12">
@if($file)
<audio controls style="height:54px;">
<source src="asset('/storage/'.$file->file)" type="audio/mpeg">
</audio>
@endif
</div>
laravel-5 mp3 playback can-bus
Controller code
for storing mp3 files
public function store(Request $request)
$this->validate($request,[
'audio' => 'required'
]);
if($request->hasFile('audio'))
$fileNameWithExt = Input::file('audio')->getClientOriginalName();
$fileName = pathinfo($fileNameWithExt, PATHINFO_FILENAME);
//$extention = Input::file('audio')->getClientOrignalExtention();
$extention = File::extension($fileName);
$fileNameToStore = $fileName.'_'.time().'.'.$extention;
$path = $request->file('audio')->store('audios');
$pdf = Audio::create([
'file' => $path,
'owner_id' => Auth::user()->id,
]);
if($pdf)
return redirect('/audios')->with('add_success', 'File add successfully ');
else
$fileNameToStore ='nothing.mp3';
to get mp3
file:
public function getAudio($id)
$file = Audio::findOrFail($id);
return view('admin.audio.playsong',compact('file'));
View code
for playing mp3
file on view :
<div class="col-md-12">
@if($file)
<audio controls style="height:54px;">
<source src="asset('/storage/'.$file->file)" type="audio/mpeg">
</audio>
@endif
</div>
laravel-5 mp3 playback can-bus
laravel-5 mp3 playback can-bus
edited Mar 23 at 11:57
Tomka Koliada
1,2562828
1,2562828
asked Mar 23 at 11:46
Waqar NaveedWaqar Naveed
43
43
You are playing MP3 over CAN bus? That's new...
– Lundin
Mar 25 at 7:28
add a comment |
You are playing MP3 over CAN bus? That's new...
– Lundin
Mar 25 at 7:28
You are playing MP3 over CAN bus? That's new...
– Lundin
Mar 25 at 7:28
You are playing MP3 over CAN bus? That's new...
– Lundin
Mar 25 at 7:28
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55313405%2fsong-not-play-in-laravel-website-error-in-console-is-failed-to-load-resource%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55313405%2fsong-not-play-in-laravel-website-error-in-console-is-failed-to-load-resource%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You are playing MP3 over CAN bus? That's new...
– Lundin
Mar 25 at 7:28