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;








0















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>









share|improve this question
























  • You are playing MP3 over CAN bus? That's new...

    – Lundin
    Mar 25 at 7:28

















0















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>









share|improve this question
























  • You are playing MP3 over CAN bus? That's new...

    – Lundin
    Mar 25 at 7:28













0












0








0








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>









share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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

















  • 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












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
);



);













draft saved

draft discarded


















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















draft saved

draft discarded
















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?