A
A
Altair008212021-12-21 19:52:08
1C-Bitrix
Altair00821, 2021-12-21 19:52:08

How to attach a file to a deal via the API?

Hello! There was a problem when adding a file to a deal via api.

While I'm trying to understand the logic on the developer's page on how to correctly form a request, everything seems to work out, but for some reason the photos are not displayed.

The problem is that I am writing in Python and therefore you must first understand all requests for url
. My request looks like this

https://my.bitrix24.ua/rest/1/TOKEN/crm.deal.update.json?ID=4035&fields[UF_CRM_1638104867920][fileData][0]=name.jpg&fields[UF_CRM_1638104867920][fileData][1]=encode64(FILE)


It seems that the file is being added, but for some reason it is crookedly recorded and does not want to be displayed either in CRM or when I download it, the problem is most likely in transferring the file and converting it to encode64, but I have not found other solutions yet, that's what I get on output
61c204b159bbd573513181.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question