kartik-v / bootstrap-fileinput

An enhanced HTML 5 file input for Bootstrap 5.x/4.x./3.x with file preview, multiple selection, and more features.
http://plugins.krajee.com/file-input
Other
5.36k stars 2.39k forks source link

PDF upload not working, shows spinning wheel, throws js errors #1870

Closed jrajamaki closed 2 months ago

jrajamaki commented 3 months ago

Prerequisites

Steps to reproduce the issue

  1. Go to demo page
  2. Upload pdf file

Expected behavior and actual behavior

When I follow those steps, I see spinning wheel without any preview and error in console: Unhandled Promise Rejection: Error: End-Of-Stream.

I was expecting, seeing a file-icon as generic preview item.

Environment

Browsers

Operating System

Libraries

Isolating the problem

Related

1822

kartik-v commented 3 months ago

Greetings. Cannot reproduce this issue in my environment here. Can you check if you have a local environment config conflict or PDF settings on browser preventing you doing something. Try it on different devices and systems to check the issue.

jrajamaki commented 3 months ago

Greetings. Cannot reproduce this issue in my environment here. Can you check if you have a local environment config conflict or PDF settings on browser preventing you doing something. Try it on different devices and systems to check the issue.

@kartik-v Hello! Tested with two other machines and also iPhone, does not work with any of them when uploading PDF file using Safari browser. For example, uploading The Foo Bird does not work.

code-knitter commented 2 months ago

Could this be related to #1862 ? The OP doesn't specify whether they use filetype.min.js, but the symptoms match. We had problems that match this description and found that the errors went away when we included filetype.js instead of filetype.min.js as described in #1862

kartik-v commented 2 months ago

Yes maybe related. The issue #1862 has a resolution. Do check with latest codebase and let know and will reopen this if issue persists.

jrajamaki commented 2 months ago

@kartik-v - good news is that using filetype.js instead of filetype.min.js fixes the issue but bad news is that the bug still happens in 1b2aa33 when using filetype.min.js.

kartik-v commented 2 months ago

I have pushed a fix - check if this works. Thanks.

jrajamaki commented 2 months ago

I have pushed a fix - check if this works. Thanks.

Yes, this fixed the issue, thank you very much.

Any estimation on new release?

kartik-v commented 2 months ago

Will post a new release soon.