Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2695 Zobrazení

I establish a website with odoo, and I use the following code to embed an mp3 file so that user can click it and listen.

"\ rel="ugc">https://gmpeden\.org/root/src/custom/eden/static/media/t26b7\.mp3">
 where\ gmpdeden\.org\ is\ the\ URL\ of\ my\ website,  /root/src/custom/eden/static/media/t26b7\.mp3  is the\ true\ path\ of\ the\ audio\ file\ in\ the\ computer\ where\ the\ webserver\ is\ run\.

But\ when\ I\ load\ the\ page\ containing\ this\ code,\ I\ get\ the\ 404\ file\ not\ found\ message\.\ Obviously\ the\ server\ does\ not\ recognize\ the\ http\ request\. 
However,\ if\ I\ move\ that\ file\ to\ google\ drive,\ and\ be\ given\ a\ share\ link\ like: "\ rel="ugc">
https://drive.google.com/file/d/1OCrcuOxDv9kmIePAvWFaPprLclI5eEKc/preview 
then it will show on website as a audio play icon  and I can listen to the audio by clicking it. Strangely enough, if I remove the "/preview" suffix, I will be given 403 forbidden.

Could someone give me the correct way to specify a file on my own web server, and explain why preview is essential for it to be played.


Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
srp 20
5339
1
bře 15
5014
1
čvc 24
1846
2
úno 24
3334
1
čvc 22
2432