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!!
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
Hi Devendar,
Could you please post your code here?
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.
Hi Devender,
How are you uploading the file? Using HTML webresource to browse and select the file for uploading from mobile device?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156