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 :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

How to attach file file while creating a record in Dynamic 365 using Web API

(0) ShareShare
ReportReport
Posted on by 15

I am using Dynamic 365 Web API for creating a record using Mobile App. Everything is working fine, but I am stuck on uploading a file using the web API. I have gone through this link https://docs.microsoft.com/en-us/powerapps/developer/data-platform/file-attributes. and tried using the method mentioned, but still, it is not working.

Please help!!

I have the same question (0)
  • Charan Raju C R Profile Picture
    7 Moderator on at

    Hi Devender,

    How are you uploading the file? Using HTML webresource to browse and select the file for uploading from mobile device?

  • Devender Adlakha Profile Picture
    15 on at

    Hi Charan Raju C R

    I am storing data at 2 Places, first, I am making a post request on to my server and uploading the image into the database by converting it into the base64 format.

    now when my base64 string is stored in the database I am using the dynamics 365 web API for file upload.

    my backend API's are created in laravel and from laravel I am using HTTP::Patch Request with bearer token.

  • Charan Raju C R Profile Picture
    7 Moderator on at

    Hi Devendar,

    Could you please post your code here?

  • Devender Adlakha Profile Picture
    15 on at

    Hi Charan Raju

    I am using POSTMAN and sending a PATCH request on

    yourdomain.api.crm8.dynamics.com/.../s36000_ic

    with the following headers{

    x-ms-file-name:ic.png,

    x-ms-transfer-mode:chunked

    }.

    after this request is triggered I get a location variable from the response header and again I am making a PATCH request on this:

    yourdomain.api.crm8.dynamics.com/.../s36000_ic

    with the following headers

    {

    Content-Range : bytes 0-33554431/*

    Content-Type : application/octet-stream

    x-ms-file-name : ic.png

    Content-Length : 10737456

    }

    but still, i am getting an error

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 > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Martin Dráb Profile Picture

Martin Dráb 51 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 38 Super User 2025 Season 2

#3
#ManoVerse Profile Picture

#ManoVerse 31

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans