Cfcontent and MIME types for MS outlook .MSG format

Hi
I am using a web service that returns the contents of a MSG file as a binary string.
I was hoping to use <cfcontent> to then be able to render the document on demand when the user required.
(e.g.)
<cfcontent type="application/vnd.ms-outlook"><cfoutput>#tostring(structDocument.filecontent)#</cfout put><cfabort /> 
However whenever I try to do this a dialogue box appears asking me to save or open the .cfm file instead of rendering the document like it would for the other file types.  Opening the .cfm file, I can see that the content is pretty much intact. 
(e.g.)
<cfcontent type="application/pdf"><cfoutput>#tostring(structDocument.filecontent)#</cfoutput><cfabor t /> 
WORKS
Does anyone have any ideas? 
Thanks

Hi Adam,
In the end, the only way that I could get it to work in all browsers was to create a temporary file.  However, the cfheader info was useful, so thanks.
Michael
Code I used:
<cffile action="write"
file="#GetTempDirectory()#/#varFileName#"
        output="#structDocument.Filecontent#"
>
<!--- Output doc --->
<cfheader name="Content-Disposition" value="#var_content_dis#">
<cfheader name="Content-Length" value="#var_content_len#">
<cfcontent type="#var_content_type" file="#GetTempDirectory()#/#varFileName#">

Similar Messages

  • Incorrect MIME type for XML Data Connection POST requests

    It appears that Xcelsius 2008u2019s XML Data Connection logic does not specify the correct MIME type for the data it sends to the server in its POST request.  Using an HTTP debug proxy, I was able to see that Xcelsius sends XML data in the POST, but is setting a content-type of u201Cx-www-form-urlencodedu201D.  According to the W3C spec:
      http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1
    Data sent with a MIME type of u201Cxxu201D should be encoded as key?value pairs, like this:
      key1=val1&key2=val2&Submit=Submit
    So, what Xcelsius is doing is clearly incorrect.  Worse, if your server process is a Java servlet, you may find that the POSTed data will be gobbled up by the servlet container and you wonu2019t be able to read it using a getInputStream(), or getReader() call because itu2019s already been processed by a call to the getParameter() method.
    The correct mime type for POSTing an XML formatted request from Xcelsius should be "text/xml".
    Wayne

    Hi,
    The Error #2032 your getting is due to the Flash player security.
    To remove this this error you need one crossdomain Xml file in the root directory which actually provides a lot more control over who has access to your data from a SWF. The cross domain policy is attached as crossdomain.xml.
    In the XML file, it is used a wildcard (*). This allows a SWF located on any machine to access your data source. You can certainly use an IP address or domain name to restrict access rather to opening it up completely. I always start with the wildcard to make sure my dashboard works, then start restricting access as necessary.
    Here is a whitepaper with everything you need to know about Flash player security:
    http://www.adobe.com/devnet/flashplayer/articles/flash_player_9_security.pdf
    Please let me know if you need any more clarification.
    Regards,
    Sanjay

  • Mime Type for document class when archiving outlook emails

    Hello team,
    can anybody fill me in how to configue the mime type for .msg files (outlook emails) in the document class msg?

    1) Use SE16 to change table V_TOADD
    2) Add:
    Document Class                 - MSG
    Description                         - Outlook Mail
    MIME type of a Web object - message/rfc822
    You can then associate the MSG document class to document types.
    Eli.

  • How To Get FileType and MIME Type from a File

    Hi,
    I am using following ways to get FileType and MIME Type.
    I am able to get file type, but I am getting MIME Type as */*
    Can any one please let me know how to get MIME Type, but it should not be time consuming process.
    For File Type I am using following Code:
    private String getFileData(InputStream inStream) {
    fileName = C:\temp\temp.tiff
    String filePath = Util.createTempFile(fileName);
    RandomAccessFile raf = new RandomAccessFile(filePath, "rw");
    while (inStream.available() > 0) {
         byte[] buf = new byte[inStream.available()];
         inStream.read(buf);
         raf.write(buf);
    inStream.close();
    raf.close();
    File file = new File(filePath);
    JFileChooser chooser = new JFileChooser();
    String fileType = chooser.getTypeDescription(file);
    file.delete();
    //MIME Type I am getting from
    DataHandler data = new DataHandler(new DocumentSource(inStream));
    data.getContentType();
    data.getContentType() is not working well in all cases.
    Can any one help me on this.
    Thanks in advance,
    Ram.
    Edited by: javausers07 on Apr 15, 2009 4:25 PM

    javausers07 wrote:
    Hi,
    I am using following ways to get FileType and MIME Type.
    I am able to get file type, but I am getting MIME Type as */*
    Can any one please let me know how to get MIME Type, but it should not be time consuming process.
    For File Type I am using following Code:
    private String getFileData(InputStream inStream) {
    fileName = C:\temp\temp.tiff
    String filePath = Util.createTempFile(fileName);
    RandomAccessFile raf = new RandomAccessFile(filePath, "rw");
    while (inStream.available() > 0) {
         byte[] buf = new byte[inStream.available()];
         inStream.read(buf);
         raf.write(buf);
    inStream.close();
    raf.close();
    File file = new File(filePath);Why do you do all above?
    JFileChooser chooser = new JFileChooser();
    String fileType = chooser.getTypeDescription(file);
    file.delete();
    //MIME Type I am getting from
    DataHandler data = new DataHandler(new DocumentSource(inStream));
    data.getContentType();
    data.getContentType() is not working well in all cases.That's because there's no way to get MIME type of all files on all filesystems.
    Kaj

  • Image size and mime type.. non-java guy needs help

    Image size, mime type.. non-java guy needs help
    Im not at all familiar with java so this is really weird for me to work out. I?ve been doing it all day (and half of yesterday).
    Im trying to write a custom clodFusion tag in java that gets the width, height, size and MIME types of a given file. I?ve been trying to get it to work on the command line first. I can get the width and height but cant get the size and the MIME type.
    Here is what I got
    /*import com.allaire.cfx.*;*/
    import java.awt.image.renderable.*;
    import javax.media.jai.*;
    import com.sun.media.jai.codec.*;
    import java.io.*;
    import java.util.*;
    public class ImageInfo {
    private RenderedOp image = null;
    private RenderedOp result = null;
    private int height = 0;
    private int width = 0;
    private String type = "";
    private String size = "";
    public void loadf(String file) throws IOException
    file = "80by80.jpg";
    FileSeekableStream fss = new FileSeekableStream(file);
    image = JAI.create("stream", fss);
    height = image.getHeight();
    width = image.getWidth();
    System.out.println(height + "\n");
    System.out.println(width);
    System.out.println(type);
    public static void main(String[] args) throws IOException {
    ImageInfo test = new ImageInfo();
    test.loadf(args[0]);
    can anyone please help me out to modify the above so I can also print the mime type and the file size to screen.
    thanks for any help

    any suggestions?

  • File Download and Mime-Types

    I have some files (txt, xls, rtf, pdf) that need to be downloaded from our site. I
    have an http link to the files on the web page. I've set mime-types for each file
    type in web.xml for that web app. I'm using WLS 6sp2 on Windows 2K. I'm using an
    MVC model for the application with a Controller servlet. Every time anyone tries
    to click on the link and download it, the Contorller kicks them to a default page.
    Can anyone help?
    Thank you.

    Go to IIS Management console. At the server level, go to MIME Types. Add a new MIME type:
    File name extension:
    .mp4
    MIME type:
    video/mp4
    Restart IIS (can't remember if this is required).
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • (261705413) Q RPCC-21 Missing text/xml MIME-type for WSDL files?

    Q<RPCC-21> Would it mess up the SOAP operations that clients do when using the
    WSDL in a dynamic client to put a text/xml mime type in the WSDL-providing jsp?
    A<RPCC-21>: It is a known issue that the MIME-type for WSDL files is not appropriately
    transmitted so some web browsers will not identify an appropriate helper application
    when they are viewed (for Netscape just press Ctrl-U to view the source). This,
    however, does not affect the dynamic client as evidenced by the example code seen
    in the code demonstration.
    Adam

    SR,
    You probably already have the answer by now, but I just came across the same problem and found the answer elsewhere.
    The trick is to have the JavaMail jar in your classpath BEFORE the JAF jar. Given the habit of my development environment to sort jars alphabetifally it had me stumped for a bit.
    Good luck
    Marc

  • Powerpoint uploads and MIME types

    I am building an application to upload PPT files. I want to
    test the
    incoming filenames to see if it *is* a PPT file, but cannot
    find a MIME type
    for it. How should I do this so that I only allow such files
    to be
    uploaded?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================

    OK - here's the skinny:
    PPT extension files have a MIME type (PC or Mac) as stated.
    PPTX extension
    files (PC or Mac) have a MIME type as shown in the line in my
    code below -
    if (($_FILES['uploadfile']['type'] ==
    'application/vnd.ms-powerpoint') ||
    ($_FILES['uploadfile']['type'] ==
    'application/vnd.openxmlformats-officedocument.presentationml.presentation'))
    This test appears to work as desired. Why would I not want to
    use it to
    filter all but Powerpoint files?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Murray *ACE*" <[email protected]> wrote
    in message
    news:[email protected]...
    > Thanks, Joe! See my reply to Gary's post....
    >
    > --
    > Murray --- ICQ 71997575
    > Adobe Community Expert
    > (If you *MUST* email me, don't LAUGH when you do so!)
    > ==================
    >
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    > ==================
    >
    >
    > "Joe Makowiec" <[email protected]> wrote in
    message
    >
    news:[email protected]...
    >> On 03 May 2008 in macromedia.dreamweaver.appdev,
    Murray *ACE* wrote:
    >>
    >>> I am building an application to upload PPT
    files. I want to test
    >>> the incoming filenames to see if it *is* a PPT
    file, but cannot find
    >>> a MIME type for it. How should I do this so that
    I only allow such
    >>> files to be uploaded?
    >>
    >> application/vnd.ms-powerpoint ppt
    >>
    >>
    http://www.w3schools.com/media/media_mimeref.asp
    >>
    >> I just checked several Powerpoint files - the first
    8 bytes are (hex)
    >> d0 cf 11 e0 a1 b1 1a e1
    >> in all the files I checked. So you can:
    >> - upload the file
    >> - open the file up and examine the first 8 bytes:
    >> $handle = fopen($filename, "rb");
    >> $contents = fread($handle, 8);
    >> if ($contents != $testvalue) { ...
    >> - for dealing with the binary string, see bin2hex
    and pack
    >>
    >>
    http://www.php.net/manual/fopen
    >>
    http://www.php.net/manual/fread
    >>
    http://www.php.net/bin2hex
    >>
    http://www.php.net/pack
    >>
    >> (This is PHP, right?)
    >>
    >> I'd also examine a few more powerpoint files - I
    think that there are a
    >> few different types? - to be sure that the signature
    I list is
    >> characteristic. And remember that Microsoft
    completely changed file
    >> structures for Office 2007, and that .pptx is
    probably completely
    >> different to all other previous formats...
    >>
    >>
    http://en.wikipedia.org/wiki/Microsoft_PowerPoint#File_formats
    >>
    >> --
    >> Joe Makowiec
    >>
    http://makowiec.net/
    >> Email:
    http://makowiec.net/contact.php
    >

  • Trying to embed a video file in HTML5: ERROR=No video with supported format and MIME type found?

    Hello all!
    I am desparate for a solution. I am testing my site on Firefox and Explorer and still no sign of a functional video yet.
    Firefox: I get the error: No video with supported format and MIME type found.
    Explorer: I just get a distorted layout.
    Here is the code I am working on:
    <table id="Table_01" width="480" height="801" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td colspan="6">
                <img src="images/Video_01.jpg" width="480" height="114" alt=""></td>
        </tr>
        <tr>
            <td rowspan="3">
                <img src="images/Video_02.jpg" width="52" height="486" alt=""></td>
            <td colspan="4">
               <video controls width="376" height="221">
                 <source src="C:\Users\aalmeida\Videos\AEMC PEL 103 6 Channel, Power & Energy Logger - with Display (Part 1).mp4" type="Video/Mp4"/>
                 <source src="C:\Users\aalmeida\Videos\AEMC PEL 103 6 Channel, Power & Energy Logger - with Display (Part 1).webm" type="Video/WebM"/>
                 <source src="C:\Users\aalmeida\Videos\AEMC PEL 103 6 Channel, Power & Energy Logger - with Display (Part 1).oggtheora.ogv" type="Video/Ogg"/>
                 </video>
    Please tell me that there is something missing in the code. I have spent a lot of time uninstalling-updating Firefox plugins, added MIME types in the Internet Information Manager (I'm on Windows 7)
    and  seriuously hit a dead end with this!
    Any advice would be muchly appreciated!!!
    Thanks
    ~LA

    As Jon said, you must declare the page as HTML5.
    And your server may not be set up to deliver video as a binary file if it is an .OGG file. I have not seen this problem with .MP4 or .M4V in the past, but every server is a little different.
    To add a MIME type, you need to change your .htaccess file on an Apache server thusly:
    AddType audio/ogg .oga
    AddType video/ogg .ogv
    AddType application/ogg .ogg
    AddHandler application-ogg .ogg .ogv .oga
    Additionally, MIME types can usually be changed on a server's Control Panel. One can also ask one's hosting provider to do this as well.
    Firefox makes it necessary to use OGG files. Webkit-based browsers will deal with .M4V or .MP4 and I understand Internet Exploder will work with the latter two as well.

  • What is the correct MIME type for an AD RMS protected PFILE?

    Hi,
     The context of why this question is asked is as follows: In an SAP Webdynpro application (the UI is displayed in a web browser). We intercept the file with SAP data that is being downloaded, encrypt it using AD RMS and then send the modified (encrypted)
    file back to be downloaded by the browser into the user's downloads folder.
     Because of this interception and modification of the text file being downloaded (.txt), which is now a .PTXT file (PFILE) there is a conflict in the MIME TYPE. 
    So could you let me know what the MIME type for a PFILE would be? Is there a standard MIME Type for all these PFILES? (.ptxt, .pfile etc..)? And is it by any chance "application/octet-stream"?

    Hi,
    I also noticed this - it seems that Microsoft's 4 char extensions like .docx are not being recognized by application type so that either the web server or mod-plsql is defaulting to the "application/octet-stream" mime type which refers to a file with binary content - instead of the traditional "application/msword" mime type you would expect.
    If you know, at the point of insert into your database table, both the mime type and file name, one workaround would be to check if the mime type is 'application/octet-stream' and the file's extension is ".docx" or other likely extensions and then treat it as mime type 'application/msword", etc.
    Not really a solution but might be sufficient workaround depending on your situation.
    Ted
    Edited by: Ted Martin on Oct 25, 2012 7:27 PM

  • I am using a verizon email address and microsoft office for mac outlook program to manage my emails.   Does any one know if  the apple outlook version offers the ability to save emails as a pdf so that I can save it to my hard drive and how to access?

    I am using a verizon email address and microsoft office for mac outlook program to manage my emails.   Does any one know if  the apple outlook version offers the ability to save emails as a pdf so that I can save it to my hard drive and how to access?

    This is the Microsoft forum site that parallels what Apple has:
    Office for Mac forums
    It's not uncommon for MS employees who work with the Mac side of the business to help there. All in all a useful resource for Office:Mac

  • Passing the file name and file type for mime_download

    HI All,
    Can You Please let me know how to pass the parameters file name and file type for mime_download.
    Thanks in Advance.
    Regards,
    Haritha.

    Hello Haritha,
    Please see the SAP help:
    http://help.sap.com/saphelp_nw70/helpdata/en/46/9bd97240b81e5be10000000a1553f6/frameset.htm
    Edgar

  • The MIME type for xslx file is different in Mozilla 13.0.1

    The MIME type for a xslx file is coming as "application/vnd.ms-excel.12" in Mozilla 13.0.1 instead of the "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" which comes in other browsers when using fileUpload.PostedFile.ContentType

    Firefox usually gets the MIME type from the MIME database registry key.
    * HKEY_CLASSES_ROOT\.xslx
    * HKEY_CLASSES_ROOT\MIME\Database\Content Type

  • Item category (Customized )ZJT1 and MRP type for material is not allowed

    Hi Guys,
                   When i try to create the order i see the error as item category and MRP type of the material is not allowed.
    I checked in Vov5 table, i could observe that Schedule line category is maintained.
    Could you please help us in resolving this..
    Thanks and regards,
    Rahul

    Hi,
    Please assign the Item Category ZJTI and MRP type (for eg: PD) assigned to the schedule line category in IMG under Sales and Distribution--> Sales ---> Schedule line -->Assign schedule line
    Hope this resolve your issue
    Regards,
    KrishnaO

  • Item Category and MRP type for material is not allowed

    Hello all,
    I got a Error Message:
    <b>Transaction Z113 is not defined (Message no. V1347)</b>
    <b>Diagnosis</b>
    This combination of item category Z113 and MRP type for material is not allowed.
    <b>System response</b>
    The system does not allow further processing of this item.
    <b>Procedure</b>
    Check your entry.
    You can display the combination defined in table TVEPZ, which controls scheduling line category determination, and change it as required if you have the authorization to do so. The MRP type for the material may be changed in the material master.
    <b>The SD Configuration seems all right, I have:</b>
    Sls Doc Type (<b>VOV8</b>) – ZA9 (no delivery type assigned)
    Item Category (<b>VOV7</b>) – Z113
    Assigs Sls Doc & Item Ctgry (<b>VOV4</b>) – ZA9/ZNOR/blank/blanl/Z113
    ZNOR = Std Item-Av. chck  Del
    ZNOR defined in MM03/Sls Org 2
    Define Schedule Line (<b>VOV6</b>) = Z7 (without delivery)
    Z7 has FLAG on Prod Allocation
    Assign Schedule Line (<b>VOV5</b>) = Z113/ND/Z7
    At table: TVEPZ
    I have the entry: Z113/ND/Z7
    Guys, what would?
    Please help me out because I am stuck in this issue.
    Thanks a lot,
    Barbara

    Barbara, this may be tied to Strategy Group on the Material Master (I can't read enough into the detail)
    Item Category determination + MRP Type for your schedule line type ties to a Sched. Line category(this you know)
    New Rqmts class gets tied to a Rqmts Type
    New Rqmts Type gets assigned to rqmts class
    Strategy, assign the Rqmts Type to it
    Strategy Group, Assign the Strategy  to it
    MM02 [MRP3 view] strategy group should be the one that ties together (all the other ties
    It may be something in this area that you need to trace through ?
    Bill

Maybe you are looking for

  • How to use iTunes with 2 iPhones with different apple id's

    I have 2 iPhone 4s with different apple Ida's and when I connect thru USB the second iPhone installs the apps from the first iPhone. I want each iPhone to back up only with is on the iPhone.

  • IMac 24 and 27 Cinema Display as second monitor

    Got older 24 iMac with mini DVI output for external monitor (ATI Radeon HD 2600 Pro 256 MB graphics) Bought 27 Cinema display to use as 2nd monitor. Bought Atlona DP400 to convert signal. Connected everything and only resolution I get on 27 Cinema di

  • On the Dock

    I have been asking the question for years and have not got any answers on the Dock. I see people asking the same Question for years . Why can't you have 2-3 Docks. What ever , A small dock or big, you can size it to the size you like or at size with

  • Transporting from DEV to QA

    We have 3 different sld's for DEV,QA,and PRD systems. i need to transport my XI objects from DEV to QA.i'm working on standard XI contents. i need answers for my following questions. 1.if i use full export for transporting SLD from DEV to QA,can i us

  • Code Inspector - Naming conventions &mExtended Naming conventions for Progs

    Hi experts, I had a look into the naming conventions enforced by 'DEFAULT' variant of code inspector (SCI). the relevant categories are: "Naming Conventions", and "Extended Naming conventions for Programs" under "Programing conventions". in the "Exte