<?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>Question Re: Serving Media Data: Content Type application/json dets data in @Core.IsMediaType field to null in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/serving-media-data-content-type-application-json-dets-data-in-core/qaa-p/12661321#M4750102</link>
    <description>&lt;P&gt;I've also filed incident 934681 / 2022.&lt;/P&gt;</description>
    <pubDate>Sun, 11 Dec 2022 18:08:33 GMT</pubDate>
    <dc:creator>gregorw</dc:creator>
    <dc:date>2022-12-11T18:08:33Z</dc:date>
    <item>
      <title>Serving Media Data: Content Type application/json dets data in @Core.IsMediaType field to null</title>
      <link>https://community.sap.com/t5/technology-q-a/serving-media-data-content-type-application-json-dets-data-in-core/qaq-p/12661320</link>
      <description>&lt;P&gt;Hello CAP Community,&lt;/P&gt;
  &lt;P&gt;it seems that the Media Handling works great for all kind of data formats like Word, Excel, PNG, JPEG, YAML and others. But it doesn't work correctly for JSON. When I create a new entry using the URL &lt;A href="http://localhost:4004/$fiori-preview/AdminService/DocumentsWithDraft?sap-language=en#preview-app" target="test_blank"&gt;http://localhost:4004/$fiori-preview/AdminService/DocumentsWithDraft?sap-language=en#preview-app&lt;/A&gt; provided from my sample app &lt;A href="https://github.com/gregorwolf/bookshop-demo" target="_blank"&gt;bookshop-demo&lt;/A&gt; I see the following requests:&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2118825-screenshot-2022-12-11-at-184428.png" /&gt;&lt;/P&gt;
  &lt;P&gt;As you can see the content is sent with the correct Content Type application/json. But in the following request where the current state of the entity is read the field content@odata.mediaContentType is returned as null:&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2118826-screenshot-2022-12-11-at-184450.png" /&gt;&lt;/P&gt;
  &lt;P&gt;When a YAML file is uploaded you directly see that the field "Content" is filled. Here you see that the Content-Type is set:&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2118827-screenshot-2022-12-11-at-184539.png" /&gt;&lt;/P&gt;
  &lt;P&gt;But in contrast to the JSON file also the value for content@odata.mediaContentType is filled:&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2118828-screenshot-2022-12-11-at-184555.png" /&gt;&lt;/P&gt;
  &lt;P&gt;Looking forward for a correction.&lt;/P&gt;
  &lt;P&gt;Best Regards&lt;BR /&gt;Gregor&lt;/P&gt;</description>
      <pubDate>Sun, 11 Dec 2022 18:02:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/serving-media-data-content-type-application-json-dets-data-in-core/qaq-p/12661320</guid>
      <dc:creator>gregorw</dc:creator>
      <dc:date>2022-12-11T18:02:52Z</dc:date>
    </item>
    <item>
      <title>Re: Serving Media Data: Content Type application/json dets data in @Core.IsMediaType field to null</title>
      <link>https://community.sap.com/t5/technology-q-a/serving-media-data-content-type-application-json-dets-data-in-core/qaa-p/12661321#M4750102</link>
      <description>&lt;P&gt;I've also filed incident 934681 / 2022.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Dec 2022 18:08:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/serving-media-data-content-type-application-json-dets-data-in-core/qaa-p/12661321#M4750102</guid>
      <dc:creator>gregorw</dc:creator>
      <dc:date>2022-12-11T18:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: Serving Media Data: Content Type application/json det...</title>
      <link>https://community.sap.com/t5/technology-q-a/serving-media-data-content-type-application-json-dets-data-in-core/qaa-p/13764913#M4837464</link>
      <description>&lt;P&gt;&lt;a href="https://community.sap.com/t5/user/viewprofilepage/user-id/12545"&gt;@gregorw&lt;/a&gt;&amp;nbsp;&amp;nbsp;We added support of streaming with 'application/json' as content-type. The data field should be modelled as cds.LargeBinary. The feature to be provided with the next release of&amp;nbsp;@sap/cds.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 13:57:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/serving-media-data-content-type-application-json-dets-data-in-core/qaa-p/13764913#M4837464</guid>
      <dc:creator>vitaly_kozyura</dc:creator>
      <dc:date>2024-07-18T13:57:45Z</dc:date>
    </item>
  </channel>
</rss>

