Просмотр исходного кода

Allow to specify an imaginary key

Signed-off-by: JanisPlayer <54918417+JanisPlayer@users.noreply.github.com>
tags/v28.0.0beta1
JanisPlayer 1 год назад
Родитель
Сommit
c71a3065a7
2 измененных файлов: 7 добавлений и 1 удалений
  1. 5
    0
      config/config.sample.php
  2. 2
    1
      lib/private/Preview/Imaginary.php

+ 5
- 0
config/config.sample.php Просмотреть файл

@@ -1227,6 +1227,11 @@ $CONFIG = [
*/
'preview_imaginary_url' => 'http://previews_hpb:8088/',

/**
* If you want set a api key for imaginary.
*/
'preview_imaginary_key' => 'secret',

/**
* Only register providers that have been explicitly enabled
*

+ 2
- 1
lib/private/Preview/Imaginary.php Просмотреть файл

@@ -136,9 +136,10 @@ class Imaginary extends ProviderV2 {
];

try {
$imaginaryKey = $this->config->getSystemValueString('preview_imaginary_key', '');
$response = $httpClient->post(
$imaginaryUrl . '/pipeline', [
'query' => ['operations' => json_encode($operations)],
'query' => ['operations' => json_encode($operations), 'key' => $imaginaryKey],
'stream' => true,
'content-type' => $file->getMimeType(),
'body' => $stream,

Загрузка…
Отмена
Сохранить