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

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Download file from url and save in Blob BC20

(0) ShareShare
ReportReport
Posted on by 15

Hi there, 

We're trying to get our app as Cloud Ready as we can and now transforming a function wich download local files and puts in incoming documents to a cloud version. 
Already works with integration with OneDrive to collect these files so thats fine. 

But now I'd like to save the file content into a Incoming Document Attachement. 

So have to download the content from URL into a TempBlob to process....but HOW ?

Any suggestions are welcome and thanks in advance. 

Frank

I have the same question (0)
  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,111 Moderator on at

    What kind of URL is this?

    If it is a Azure blob storage you have a whole library of function already in place in AL.

    If it is an API that gives you the images in base64 encoded format you have to use the httpclient.

    So it is very dependent on the storage / solution your URL is pointing to.

  • frankvdd Profile Picture
    15 on at

    Hi Inge, thanks for your response.

    Its a file stored in a OneDrive so was already trying with httpClient.

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,111 Moderator on at

    Working with OneDrive you should look at the functions available in  Codeunit 9510 "Document Service Management".

    Most things you want to do should be available there.

  • Suggested answer
    YUN ZHU Profile Picture
    95,597 Super User 2025 Season 2 on at

    Hi, just adding to Igne's reply, if you don't want any user interaction in BC, consider Graph API.

    https://docs.microsoft.com/en-us/graph/api/resources/dynamics-graph-reference?view=graph-rest-beta

    https://www.msnjournals.com/post/how-to-use-microsoft-graph-api-in-business-central

    Hope this helps as well.

    Thanks.

    ZHU

  • Suggested answer
    ShanAbeywicrema Profile Picture
    948 on at

    You can use Graph API to archive this task. Follow YUN ZHU shared links. I tested it was working.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,010

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,270 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,085 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans