Browse Source

bug fix for image save

master
filesite 8 months ago
parent
commit
5387bfb120
  1. 21
      conf/custom_config_tajian.json
  2. 2
      themes/tajian/controller/FrontapiController.php

21
conf/custom_config_tajian.json

@ -0,0 +1,21 @@ @@ -0,0 +1,21 @@
{
"theme":"tajian",
"content_directory":"tajian/",
"heroUnion": {
"server_url": "https://herounion.filesite.io",
"uuid": "machete_tajian",
"token": "machete_tajian",
"contract": "tajiantv",
"country": "cn",
"lang": "zh",
"data_mode": "json",
"notify_url": "https://tajian.tv/frontapi/hunotify",
"supportedPlatforms": {
"抖音": "douyin",
"快手": "kuaishou",
"西瓜视频": "xigua",
"B站": "bilibili"
}
}
}

2
themes/tajian/controller/FrontapiController.php

@ -253,7 +253,7 @@ eof; @@ -253,7 +253,7 @@ eof;
//保存图片文件
if (!empty($task_data['cover_base64'])) {
$filepath_cover = "{$data_dir}/{$video_id}.{$task_data['cover_type']}";
file_put_contents($filepath_cover, $task_data['cover_base64']);
file_put_contents($filepath_cover, base64_decode($task_data['cover_base64']));
$filepath_desc = "{$data_dir}/{$video_id}_cover.txt";
file_put_contents($filepath_desc, "{$video_id}.{$task_data['cover_type']}");

Loading…
Cancel
Save