Website cannot access files?
So I've got a website made through GoDaddy and bought cPanel for the file hosting service. I have a feature on the website for a button to play audio when clicked. I uploaded the audio to my cPanel and linked the direct url from the audio file to the website. The feature works but only on my browser, no other computers can access the file. The permissions are set to read and executable and I am not sure how to allow clients to access the file when clicking the button?
-
Your code is likely linking to the local file. Taht is why you can play it but others cannot. You need to fix the link on your button to point to where you uploaded it on your site. 0 -
I have made sure that the link is the file in my cPanel and not local. I can copy and paste the link on a separate device but it requires a login to cPanel to access. The permissions for the file are open to the public so I"m not sure why? 0 -
If you want to PM me the page I'll see if I can see the problem but we cant tell without looking at the code. 0 -
I can copy and paste the link on a separate device but it requires a login to cPanel to access.
Sounds like you've got the file in a password protected directory, or, outside public_html.0 -
The website is and the files are all within public_html. 0 -
I've removed your link, no need here. I did look at the source code of your website though, You're linking to files from within cPanel File Manager it seems. You should edit the link to be something like this: example.com/sounds/thunder.wav example.com/sounds/rain.wav At the moment, the links are: https://serverhostname.example.com:2083/cpsess8436549350/frontend/paper_lantern/filemanager/showfile.html?file=Thunder.wav https://serverhostname.example.com:2083/cpsess8436549350/frontend/paper_lantern/filemanager/showfile.html?file=Rain.wav0 -
Ah I see. How would I go about changing the links? I've had a look online but nothing stands out. They focus more on changing the general file names within the File Manager. 0 -
In File Manager, click the index.html (or index.php) and then click Edit at top of page to edit the code of the page itself. Of course, you'll need to know where the actual files are located. If in public_html, then example.com/thunder.wav. If in a directory, example.com/sounds/thunder.wav Knowing that file's location in advance, you can simply edit the code of your home page to change the incorrect URL mentioned above. GL! 0
Please sign in to leave a comment.
Comments
8 comments