O
O
Octoberfest2017-01-23 18:58:51
PHP
Octoberfest, 2017-01-23 18:58:51

How to get a link to a file uploaded through a form in 1C Bitrix?

Hello. I added a form with a "file" type field, I need to get a link to it in order to send it by email. I can't find where the file is "put" into the right folders (random names). I'm using a web form component, I can't find it in ../form.result.new/component.php. Where should you look?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roman Gritsuk, 2017-01-23
@winer

How much I have understood you use Web forms.
If you need to attach a link to a file to a letter, then you need to:
1) The field itself is configured as a file 075dce1afadc4f488dbb93c89096178f.png
2) Create a mail template 1da42e656fb34596a4d8f474c98ef45e.png, a link to the file will be transferred to it.
If you need to add your own logic to all this, then you can subscribe to the onAfterResultAdd event , and already having the result id, get the data you need using the module API .

I
Ilya, 2017-01-23
@rpsv

The CFile class is responsible for working with files.
Documentation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question