06-16-2023, 11:32 AM | #1 |
Enthusiast
Posts: 27
Karma: 10
Join Date: Aug 2019
Device: Lenovo TB-X704F
|
<a href="....."> with relative file URL
Greetings.
I have a map containing an Epub and a series of MP3s, and I would like to refer to these MP3-files from within the Epub. I know how to do that with an absolute file URL, but I don't want that. I want to be able to move this whole map to another device, without having to respecify my urls. So I need relative file URLs. However, no matter what I specify the path it seems to follow is incorrect. I must be overlooking something, but what? Btw, I'm using ADE ro read this Epub. Don't know if that matters. thx for any info. Willem V |
06-16-2023, 04:30 PM | #2 |
Wizard
Posts: 1,213
Karma: 4949904
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
|
Advert | |
|
06-16-2023, 05:55 PM | #3 |
Enthusiast
Posts: 27
Karma: 10
Join Date: Aug 2019
Device: Lenovo TB-X704F
|
With "map" I mean "folder" / (sub)directory. This directory contains an epub and a series of MP3-files. The MP3s are not included in the Epub.
From a page in this epub I would like to refer to a MP3 using a link specifying a relative file URL in a <a>-tag. This way I can play an MP3 when I click on a picture. My problem is: how do I specify the file URLin the HREF of the <a>? I know how to do this with an absolute file-URL, but this would tie me to a specific path on my - local - drive, and I don't want that. |
06-16-2023, 06:24 PM | #4 |
Grand Sorcerer
Posts: 5,374
Karma: 99197566
Join Date: Apr 2011
Device: pb360
|
I think your mp3 files need to be in the epub file (which is a zip file with certain requirements for the files inside),
|
06-16-2023, 06:46 PM | #5 |
Enthusiast
Posts: 27
Karma: 10
Join Date: Aug 2019
Device: Lenovo TB-X704F
|
I thought of that, but it would make the epub even bigger than it already is. It's a Korean picture dictionary (lots of pictures), accompanied by 39 MP3-files that would add another 60+MB to the epub. But if I must, then I must.
|
Advert | |
|
06-16-2023, 09:14 PM | #6 |
A Hairy Wizard
Posts: 3,131
Karma: 18727091
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
The topic of external links comes up every so often. What I remember from the last time is that it is device/app/OS dependent on whether support for external links is provided. In addition, if you are trying to sell/publish an ePub it’s not recommended to use external resources because of the (good?) chance of those resources not being available at some point for some reason.
If it is for personal use, then you can point the url to a publicly accessible folder that you can serve from - Dropbox, iCloud, etc. |
06-16-2023, 11:57 PM | #7 |
Wizard
Posts: 1,213
Karma: 4949904
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
I found this sample book as a helpful example. But like turtle91 stated, whether it works depends on the reader..
https://www.mobileread.com/forums/sh...56#post4143856 |
06-17-2023, 08:58 AM | #8 |
the rook, bossing Never.
Posts: 11,987
Karma: 88000007
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
An app or webpage is far better for this kind of thing than an epub.
|
06-23-2023, 10:34 AM | #9 |
Enthusiast
Posts: 27
Karma: 10
Join Date: Aug 2019
Device: Lenovo TB-X704F
|
I decided to include the MP3s in the Epub and to access them with <audio></audio>. This works and doesn't look bad at all.
I think I'll just leave it at that. Thanks everyone! |
Tags |
href, html code, relative url |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
"can't fetch relative reference: not viewing any document" | TalSO | Recipes | 2 | 07-29-2018 04:29 PM |
"Error while parsing file 'element "img" not allowed here" | shotsfromthebar | Editor | 3 | 03-31-2017 03:53 AM |
Apple Mac now have a file extension ".iba" for the program "iBooks Author." | brucehobson | Calibre | 3 | 09-15-2014 07:46 PM |
Custom column: "Updated date", when adding new "versions" of the same file? | enriquep | Library Management | 16 | 11-03-2011 10:46 AM |