can you show your form and controller code
Unable to upload audio file
Hello,
I am trying to upload a audio file. Initially i got 413 Request Entity issue. I resolved it Later, I tried to upload the audio again, there is no 413 Request Entity issue. But the audio is not being uploaded I am trying to save it in public/storage folder. Can anyone help me on this issue
@AbdulRehmanDar Audio Form: https://pasteboard.co/WNxAmbhEPSjQ.png
Controller - Store Audio https://pasteboard.co/KlesIROhV3Gc.png
@srichakra The 413 HTTP issue means the file is too large. Check more here
Besides, make sure that you have enctype='multipart/form-data' in your form. If you are curious to know when and why we need to use enctype, then check this
FYI, you can check this tip also for audio file upload in laravel.
Hi @tisuchi The audio file being uploaded in local environment. But when uploading in server the file is not being uploaded. Initially we got 413 message. But now after making changes we are not getting that message. But the audio file is not being uploaded. Is there anything we can do on the server side
@SriChakra does it work with smaller files?
Hi @Snapey No it's not working with smaller files even. Initially the audio file was 41mb and i compressed it to 6mb. The file didn't upload. I tried with even less sized files. But i didn't find any luck at all. But in local it's working fine
@SriChakra You need to share your code, otherwise it's ompossible for us to guess what is wrong.
@SriChakra if it's shared hosting it's likely to be limited for images, eg like 2mb
don't forget it will take much longer to upload to a remote server. if you have adsl it's likely to be like 1/10th the speed of downloads
Audio Form: https://pasteboard.co/WNxAmbhEPSjQ.png
Controller - Store Audio https://pasteboard.co/KlesIROhV3Gc.png
@SriChakra So you get no errors while uploading the file?
Check the log for any errors not shown.
Try removing the authorization from your storeAudio method.
BTW please copy and paste the code into your query instead of linking to images.
@SriChakra Any chance you are redirected to the welcome route? So the auth check fails
@Sinnbeck I am not redirected back to welcome route. I am staying on same create audio route, once the audio is uploaded. Redirection is not happening because the file is not uploaded
tried it with a 2k file?
It could be anything since you don't validate. So you could for instance just upload a php file and then execute it !
@Snapey I tried with 2K file. But still the file is not being uploaded
bro did you solve the problem
Please or to participate in this conversation.