Skip to Content
author's profile photo Former Member
Former Member

Not getting correct mime type


i am using a file upload UI element in which i have to restrict the files to upload based on file extension.

I am accessing the mime type. but for .exe files i am getting the mime type as application/pdf.

please suggest how can i get the correct mime type.



Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Mar 18, 2011 at 07:04 AM

    For exe file the mime type will be APPLICATION/OCTET-STREAM

    i guess there is somemismatch happening in your mapping.

    check your code and binding onece again.


    sarbjeet singh

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member


      Our requirement is to enable user to enter only pdf and tiff files.

      But the mime type for .tif is coming APPLICATION/OCTET-STREAM and for .tiff is coming different.Is there any difference between the two?

      The user is not able to attach .tif files.Any pointers.

  • author's profile photo Former Member
    Former Member
    Posted on Mar 25, 2011 at 11:22 AM

    We are getting the mime-type as application/octet-stream when we are attaching the .tiff files. Plz suggest some way so that we can only be able to attach .tiff files and no other formats(like .dll, .exe etc.).

    On debugging i found dat the method get_mime_type( ) of the class CL_WD_FILE_UPLOAD is yielding correct value image/tiff when i check for the same .tiff file on some other system.

    Kindly let me know whether there are some pre-defined mime types present in the some system.

    When we checked in our system it is yielding value as application/octet stream in our case for the same mime_type.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.