Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
en:start:filestore [2016/07/07 14:15] admin [Хранилище файлов] |
en:start:filestore [2016/07/07 14:17] (current) admin [Разработчикам] |
||
---|---|---|---|
Line 10: | Line 10: | ||
Every task in the same execution, which support filestore Input, could open the file with the ID “file_xyz”. | Every task in the same execution, which support filestore Input, could open the file with the ID “file_xyz”. | ||
- | ==== Разработчикам ==== | + | ==== Developers ==== |
- | Если вы хотите использовать хранилище файлов в собственных Задачах, используйте следующий интерфейс класса \Workflow\VTEntity, доступный | + | If you want to use the filestore in your own actions, use the following interface of the \Workflow\VTEntity class, given to the action in $context. \\ |
- | через переменную $context. \\ | + | |
- | Чтобы сохранить файл в хранилище файлов: | + | **To store a file inside the filestore:** |
<Code>$context->addTempFile($filepath, $filestoreid, $filename);</Code> | <Code>$context->addTempFile($filepath, $filestoreid, $filename);</Code> | ||
Line 25: | Line 24: | ||
<tr> | <tr> | ||
<td style="padding:5px;background-color:#D8D8D8;">$filepath</td> | <td style="padding:5px;background-color:#D8D8D8;">$filepath</td> | ||
- | <td style="padding:5px;">Строка</td> | + | <td style="padding:5px;">String</td> |
- | <td style="padding:5px;">Временный путь к файлу, который вы хотите поместить в хранилище. Этот файл будет перемещен в главную директорию временных файлов Дизайнера Бизнес-Процессов</td> | + | <td style="padding:5px;">The temporarily path to the file you create This file will be moved to the central tmp directory inside Workflow Designer</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
<td style="padding:5px;background-color:#D8D8D8;">$filestoreid</td> | <td style="padding:5px;background-color:#D8D8D8;">$filestoreid</td> | ||
- | <td style="padding:5px;">Строка</td> | + | <td style="padding:5px;">String</td> |
- | <td style="padding:5px;">ID, который вы хотите использовать для идентификации файла</td> | + | <td style="padding:5px;">The ID you want to use, to store the File</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
<td style="padding:5px;background-color:#D8D8D8;">$filename</td> | <td style="padding:5px;background-color:#D8D8D8;">$filename</td> | ||
- | <td style="padding:5px;">Строка</td> | + | <td style="padding:5px;">String</td> |
- | <td style="padding:5px;">Имя файла</td> | + | <td style="padding:5px;">The filename of this file. Could be used by tasks to use the correct filename</td> |
</tr> | </tr> | ||
</table> | </table> | ||
Line 50: | Line 49: | ||
<tr> | <tr> | ||
<td style="padding:5px;background-color:#D8D8D8;">$filestoreid</td> | <td style="padding:5px;background-color:#D8D8D8;">$filestoreid</td> | ||
- | <td style="padding:5px;">Строка</td> | + | <td style="padding:5px;">string</td> |
- | <td style="padding:5px;">ID файла, который вы хотите загрузить</td> | + | <td style="padding:5px;">The ID of the file you want to get</td> |
</tr> | </tr> | ||
</table> | </table> | ||
</html> | </html> | ||
- | Возвращает | + | Returns |
<Code> | <Code> | ||
array( | array( | ||
- | "path" => <абсолютный путь к файлу>, | + | "path" => <absolute path to the file>, |
- | "name" => <название файла, которое вы задали в функции addTempFile()> | + | "name" => <filename you set during addTempFile> |
) | ) | ||
</Code> | </Code> |