0

Here I am having file types and download collection of file types as a zip file all the image format is working fine except "pdf" file the downloaded file contains "filename.undefined" (pdf file only). other files extension same(filename.jpg, filname.png, filename.gif) enter image description here

readonly FILE_TYPE = { "image/png": "png", "image/jpeg": "jpg", "image/jpg": "jpg", "image/gif": "gif", "image/pdf": "pdf" };

Is this correct way mentioned pdf file type what I mentioned "image/pdf": "pdf"?

Thanks.

imjayabal
  • 805
  • 1
  • 12
  • 24

1 Answers1

1

The MIME media type for pdf is application/pdf and not image/pdf.

See Proper MIME media type for PDF files

Learning is a mess
  • 7,479
  • 7
  • 35
  • 71