web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

Tenant Media Table

(1) ShareShare
ReportReport
Posted on by 14

Hi 

We have a Tenant Media table which has over 45gb of data in there, containing a mixture of image/jpeg, image/png and application/octet-stream Mime Type files.    The table has become too large and we need to clear this down or find out what keeps on populating this table. 

The content column on the Tenant Media and Tenant Media Thumbnail tables are blank. 

I have checked the Customers, Vendors, Items and Contacts pages and cannot find any images being used anywhere.   

Does anyone know how I can see where the media is being used?  Either functionally via Business Central or via VS Code? 

Thanks

Gurpal 

I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    89,974 Super User 2025 Season 2 on at
    RE: Tenant Media Table

    Hi, I just did a simple test, hope it helps you.

    More details: https://yzhums.com/26326/

    Thanks.

    ZHU

  • Gurpal Profile Picture
    14 on at
    RE: Tenant Media Table

    Hi Zhu

    Thank you for the reply, I've been looking into this one today and cannot see a way of exporting directly out of the Tenant Media table.  

    The link you provided assumes that you wish to export the current media object (such as a JPEG image) that is being used on a record to an OUTSTREAM object.

    In the example code in the link where it states:  myItemRec.Image.ExportStream(dataOutStream);

    I cannot see that there is any suitable field on the Tenant Media Table to use in place of "Image".

    Would I need to follow the example in this link:

    Working With Media on Records - Business Central | Microsoft Docs

    So that once I have copied each media field to a record in a new table, then use the example that was provided in the link you shared to export the media?  

    If you know of an easier more efficient way to do it, I'd love to hear it.

    Thanks

  • Suggested answer
    YUN ZHU Profile Picture
    89,974 Super User 2025 Season 2 on at
    RE: Tenant Media Table

    Hi, I know this is not a good way.... You can export all contents using the following method. . . Then check what exactly is the problem. . But there is 45G. . .

    pastedimage1654563642564v3.png

    https://docs.microsoft.com/bs-latn-ba/dynamics365/business-central/dev-itpro/developer/methods-auto/media/media-exportstream-method

    pastedimage1654563612767v2.png

    PS: In the previous version of BC, we could directly see the pictures in the Content on the Web Client, but now it doesn't seem to work.

    BC16:

    pastedimage1654563800269v4.png

    BC20:

    pastedimage1654563850204v5.png

    Hope this helps.

    Thanks.

    ZHU

  • Gurpal Profile Picture
    14 on at
    RE: Tenant Media Table

    Hey,

    Item cards have no images.

    The lines on the Incoming Documents page do have attachments but they are not present on the Tenant Media table.

    Posted Sales Invoices and Posted Purchase Invoices do have attachments showing on the Tenant Media Table dating back to 2019.

    So I think that pretty much answers why the Tenant Media table is so large

  • Suggested answer
    Nitin Verma Profile Picture
    21,607 Moderator on at
    RE: Tenant Media Table

    Hi,

    can you please check if any images added to the items card, incoming documents, any attachments in posted invoices either sales and purchases?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,737 Super User 2025 Season 2

#2
Sumit Singh Profile Picture

Sumit Singh 2,577

#3
Jeffrey Bulanadi Profile Picture

Jeffrey Bulanadi 2,251

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans