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 :
Microsoft Dynamics NAV (Archived)

How to restrict BLOB type field?

(0) ShareShare
ReportReport
Posted on by

Hi,

I have a requirement to restrict upload size of BLOB field. By default it allows to upload upto 2 GB. My requirement is to restrict it to 1 MB. i.e. pictures more than 1 MB should not be able to upload. Can this be done? Please help.

Best Regards,

Lakshan. 

*This post is locked for comments

I have the same question (0)
  • Verified answer
    keoma Profile Picture
    32,729 on at
    RE: How to restrict BLOB type field?

    you can use .net class System.IO.FileInfo to check the size of the file before importing.

    // variables:

    // FileInfo, record, System.IO.FileInfo

    // path, text

    // length, integer

    FileInfo := FileInfo.FileInfo(path);

    length := FileInfo.Length;

    if length > 1.000.000 then

    error('picture to big');

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
Saurav.Dhyani Profile Picture

Saurav.Dhyani 2 Super User 2025 Season 2

#2
RK-25090803-0 Profile Picture

RK-25090803-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans