P
P
pzverr2014-10-20 08:34:43
PHP
pzverr, 2014-10-20 08:34:43

How to transfer a file from 1C to a web server?

Good afternoon.
There is a certain API system written in php for interacting with 1C. The problem is that it needs to be passed through the request like api.somedomain.net/orders/upload, .pdf file. Is it even possible to transfer files this way...?
What are the possible solutions to this problem?
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry Kinash, 2014-11-03
@pzverr

What are the possible solutions to this problem?

The options are limited to the host (site) only. From the side of 1C I don’t see any plugs. Even if there are some exotic transfer methods (encrypted with certificates, unusual transfer protocols, etc.), you can always save the file to disk and feed it to an external program, which in turn implements an unusual transfer protocol.
And usually in practice the following four options for exchanging files are used:
1) Sending via HTTP (POST method) by analogy, as you attach files in the browser on forums or mail sites.
2) Upload to FTP.
3) Upload to a network share. Here, either a computer with 1C or a web server must have, say, VPN access to the LAN of its correspondent.
4) Sending by mail. Here the site must have access to the mailbox.
The most understandable and easily implemented first option. Here you just need to create an object of type HTTPConnection (HTTPConnection) and pull its SendDlyaProcessing (Post) method.

D
Dmitry Entelis, 2014-10-20
@DmitriyEntelis

Since you need to transfer a file, it means that api somehow knows how to accept it.
Accordingly, you need to find out in what form api can receive a file and send it in this form.
There is a sea of ​​information on 1C in the network, for example, how to send via POST infostart.ru/public/20017

X
xmoonlight, 2014-10-20
@xmoonlight

POST/PUT

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question