Skip to content

Upload pdfs or other types than image #906

@BjoernSag

Description

@BjoernSag

Description

We are trying to upload PDFs to using the netlify widget. But we get this error:
Screen Shot 2022-03-15 at 14 29 55

The file seems to be uploaded correctly by the response we get in the network tab, however it doesn't return any link or any way to preview/embedd it into the page.

We attempted to fix it by setting the config to: imagesOnly: false,
inputAcceptTypes: 'application/',
preferredTypes: 'application/
'

But it still gives error upon upload

Steps to reproduce

Try to upload a PDF.

Expected result

The PDF gets uploaded and we can use it in our project.

Actual result

We get an error as seen above

Environment

Node v: v16.13.1
uploadcare-widget: "3.17.0",

  • widget version:
  • node -v:
  • npm -v:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions