bartoffw / instabook

Create eBook from any page instantly and beautifully.
GNU General Public License v3.0
3 stars 0 forks source link

Incomplete downloads (.part files) #4

Open BrendanOerlemans opened 3 weeks ago

BrendanOerlemans commented 3 weeks ago

Using the firefox extension, saving a single article. Clicking the download button either:

Ideally: the extension asks where to save the file and under what file name (save-as prompt window) and properly save as a .epub-extension file instead of a .part file (I have the feeling these two issues are linked).

bartoffw commented 3 weeks ago

Can you share an example URL where you have that issue? What version of Firefox are you using?

BrendanOerlemans commented 3 weeks ago

For example this page: https://longreads.com/2024/05/07/death-of-the-hiker/ (just testing out)

I'm on firefox 132.0.1. (64bit) on a windows 10-machine. For reference, a similar extension (epubpress) works well on the same installation, but I prefer the epub's your extension creates :-)

bartoffw commented 3 weeks ago

Obviously, I'm not able to reproduce the problem on a similar configuration (Firefox 132.0.1 (64-bit) on Windows 11) 🙃

I'll take a look at the download plugin I'm using in the extension to see if I can find anything better or more customizable.

bartoffw commented 2 weeks ago

Please take a look at the latest version I just released (1.2.1). I tested some other download plugins but none of them worked better than the one that I'm already using. However, I did improve some download workflows so the UI should be now reflecting the download status (downloaded/not downloaded yet) better than before.

Also, the download location window may not be showing for you because of the settings you may have in your browser (specifically the "Always ask you where to save files" checkbox): image

I have tested the extension on multiple browsers and different download settings and it always worked as expected. Please let me know though if you're still experiencing issues.

BrendanOerlemans commented 1 week ago

I both updated and uninstalled / reinstalled, but the issue still persists for me. I made a quick screen-recording to show what happens:

https://github.com/user-attachments/assets/e35aa37e-562f-4f14-8a75-6c5a005031f0

Additionally, the epub-file is displayed well on the PC (see screen recording), but yields an error when trying to open on my e-reader (onyx boox).

The download-settings are indeed set to 'always ask', see using the other extension at the end of recording. I hope this helps.

bartoffw commented 1 day ago

Thanks for sending the video, that's really helpful!

I'm trying to debug this and I'm testing a different library for the file download. I prepared 2 simple HTML files that use different libs to download the file:

  1. https://instabook.site/save-as.html - this is using the method that is currently used in the Instabook extension
  2. https://instabook.site/save-file.html - this is using an alternative method

Can you click on these links and try to download the files from each page? The file is just a zip file with the epub extension. Inside the file there's a single txt file with some text. The zip file is generated in JS (you can see it when you open the page source) and it's exactly the same method as the one used in Instabook to generate the epub file. So, as a result, the first method shouldn't work correctly for you (as it doesn't work with the extension) and hopefully the second method will work. Both pages work correctly for me so I'm not able to tell which one is better.

Can you let me know if any of these work for you?