Skip to content

application mime type not allowing in chrome. #1322

@vinaypathak05

Description

@vinaypathak05

I'm allowing to accept application mime type below is my code snap

let accept =
"application/pdf,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation,application/zip";

<Dropzone
onDrop={onDropFile}
accept={accept ? { [accept]: [] } : {}}
multiple={false}
>
{({ getRootProps, getInputProps }) => (
<div
{...getRootProps()}
className={${className} flex items-center justify-center space-x-3 w-full h-full px-3 py-3 cursor-pointer border border-default rounded-md}
>
<input {...getInputProps()} />

{displayText}


)}

  for application mime type, its working in firefox, but not in chrome. getting below error
  
  Failed to execute 'showOpenFilePicker' on 'Window': Invalid type: application/pdf,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation,application/zip

Desktop (please complete the following information):

  • OS: macOS
  • Browser: chrome
  • Version: 118.0.5993.70

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions