# ePub upload is broken

**URL:** <https://forum.readlang.com/t/epub-upload-is-broken/103>\
**Category:** Bugs\
**Created:** [June 10, 2024, 9:33am UTC](https://forum.readlang.com/t/epub-upload-is-broken/103 "2024-06-10T09:33:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![daniel-mayer](https://forum.readlang.com/user_avatar/forum.readlang.com/daniel-mayer/32/65_2.png) [@daniel-mayer](https://forum.readlang.com/u/daniel-mayer)\
**Post date:** [June 10, 2024, 9:33am UTC](https://forum.readlang.com/t/epub-upload-is-broken/103/1 "2024-06-10T09:33:33Z")

</div>

Brave does not allow selecting \*.epub files for upload from the browse file dialog. Only a few hours ago it was still possible.

Safari allows epub upload but instead of maintaining the epub format, the uploader extracts text from the epub and puts it in the “Paste Text” text area while horribly messing up the charset.

---

<div class="post-metadata">

**Author:** ![steve](https://forum.readlang.com/user_avatar/forum.readlang.com/steve/32/4_2.png) [@steve](https://forum.readlang.com/u/steve)\
**Post date:** [June 10, 2024, 10:40am UTC](https://forum.readlang.com/t/epub-upload-is-broken/103/2 "2024-06-10T10:40:12Z")

</div>

I’ve just tested in the latest versions of both Brave and Safari on macOS and managed to successfully upload an .epub.

Is this an issue with a specific .epub file? If so, please could you email it to me at [steve@readlang.com](mailto:steve@readlang.com).

If Readlang can’t import a specific epub one workaround is to convert it to text using [Calibre](https://calibre-ebook.com/) and then upload that to Readlang.

---

<div class="post-metadata">

**Author:** ![daniel-mayer](https://forum.readlang.com/user_avatar/forum.readlang.com/daniel-mayer/32/65_2.png) [@daniel-mayer](https://forum.readlang.com/u/daniel-mayer)\
**Post date:** [June 10, 2024, 12:01pm UTC](https://forum.readlang.com/t/epub-upload-is-broken/103/3 "2024-06-10T12:01:12Z")

</div>

Ok, I sent you the file and a screenshot.

---

<div class="post-metadata">

**Author:** ![steve](https://forum.readlang.com/user_avatar/forum.readlang.com/steve/32/4_2.png) [@steve](https://forum.readlang.com/u/steve)\
**Post date:** [June 10, 2024, 1:32pm UTC](https://forum.readlang.com/t/epub-upload-is-broken/103/4 "2024-06-10T13:32:52Z")

</div>

In case anyone else comes across this problem, I’ve copied and pasted part of my private email reply with the name of the epub changed to `my-story.epub`:

* * *

When I unzipped your attachment it behaved as you explained. I did a little investigating and it turns out that what looks like a file inside called `my-story.epub` is actually a directory. There’s an explanation as to why directories can look like files on macOS here: [finder - What Makes an macOS "Package" Show as a Package? - Ask Different](https://apple.stackexchange.com/questions/280280/what-makes-an-macos-package-show-as-a-package)

I couldn’t find a simple way to fix Readlang so that it accepts uploading of these packages (directories that look like files) so what I did was to create a new .epub file for you by re-compressing the contents as a single file (a normal .epub file is also a .zip file):

```sh
cd my-story.epub
zip -r ../my-story-zipped.epub *

```

---

<div class="post-metadata">

**Author:** ![daniel-mayer](https://forum.readlang.com/user_avatar/forum.readlang.com/daniel-mayer/32/65_2.png) [@daniel-mayer](https://forum.readlang.com/u/daniel-mayer)\
**Post date:** [June 10, 2024, 5:58pm UTC](https://forum.readlang.com/t/epub-upload-is-broken/103/5 "2024-06-10T17:58:18Z")

</div>

Wow, good job!

Could it be that every ebook in EPUB format dragged out of Apple books is a package? Because it sure is with a dozen ones I have tried.

Might be worth it to make RL compatible with packages in that case.
