<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic RE: Convert file to Binary and get MIME type in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Convert-file-to-Binary-and-get-MIME-type/m-p/74032#M26637</link>
    <description>Hi &lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/1981"&gt;@john.hammond&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;FWIW - There is a method in the .NET Framework that will return the MIME mapping for a specified file. You can find more about it &lt;A href="https://docs.microsoft.com/en-us/dotnet/api/system.web.mimemapping.getmimemapping?view=netframework-4.7.2" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;​&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Eric Wilson&lt;BR /&gt;Director, Integrations and Enablement&lt;BR /&gt;Blue Prism Digital Exchange&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Fri, 26 Aug 2022 15:10:00 GMT</pubDate>
    <dc:creator>ewilson</dc:creator>
    <dc:date>2022-08-26T15:10:00Z</dc:date>
    <item>
      <title>Convert file to Binary and get MIME type</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Convert-file-to-Binary-and-get-MIME-type/m-p/74030#M26635</link>
      <description>Afternoon all. I'm experimenting with using the 'Send Mail' functionality from the Outlook Graph API connector, but the required collection for Attachments requires 3 columns - the name of the file, the MIME type of the file (e.g. application/pdf) and the content of the file in binary. Previously, using the Outlook VBO, you simply needed a filepath to the file to be attached. Are there any objects that could reliably and consistently provide the MIME type for a given file and convert it into binary data for use with this action?&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;John Hammond&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 26 Aug 2022 13:19:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Convert-file-to-Binary-and-get-MIME-type/m-p/74030#M26635</guid>
      <dc:creator>john.hammond</dc:creator>
      <dc:date>2022-08-26T13:19:00Z</dc:date>
    </item>
    <item>
      <title>RE: Convert file to Binary and get MIME type</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Convert-file-to-Binary-and-get-MIME-type/m-p/74031#M26636</link>
      <description>Apologies - spent a bit more time playing with this and 'kinda' figured it out, in case anyone else finds themselves in need (although any better ways of getting the MIME type would probably not be a bad idea):&lt;BR /&gt;&lt;BR /&gt;Didn't realise but one of the File functions (LoadBinaryFile) in a calc stage has the ability to convert a file into binary data, so that was the first problem solved. As for the MIME type, I made up a collection of the common file extensions we may end up emailing (came up with about 18 at the moment) and then looped through this collection, comparing it against the extension of the file I was trying to attach. Works a charm now!&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;John Hammond&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 26 Aug 2022 14:19:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Convert-file-to-Binary-and-get-MIME-type/m-p/74031#M26636</guid>
      <dc:creator>john.hammond</dc:creator>
      <dc:date>2022-08-26T14:19:00Z</dc:date>
    </item>
    <item>
      <title>RE: Convert file to Binary and get MIME type</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Convert-file-to-Binary-and-get-MIME-type/m-p/74032#M26637</link>
      <description>Hi &lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/1981"&gt;@john.hammond&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;FWIW - There is a method in the .NET Framework that will return the MIME mapping for a specified file. You can find more about it &lt;A href="https://docs.microsoft.com/en-us/dotnet/api/system.web.mimemapping.getmimemapping?view=netframework-4.7.2" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;​&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Eric Wilson&lt;BR /&gt;Director, Integrations and Enablement&lt;BR /&gt;Blue Prism Digital Exchange&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 26 Aug 2022 15:10:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Convert-file-to-Binary-and-get-MIME-type/m-p/74032#M26637</guid>
      <dc:creator>ewilson</dc:creator>
      <dc:date>2022-08-26T15:10:00Z</dc:date>
    </item>
  </channel>
</rss>

