Commit f55a3b2d authored by 刘小敏's avatar 刘小敏

优化

parent 24763b3f
......@@ -102,7 +102,7 @@ class AiVideoRetry extends BaseJob
// 保存远程视频到本地
$aiService = new Ai();
$video_url = $aiService->saveFileLoc(isset($result['content']['video_url']) ? $result['content']['video_url'] : '', '.mp4', 'gen_ai', $user_id);
$video_url = $aiService->saveFileObs(isset($result['content']['video_url']) ? $result['content']['video_url'] : '', '.mp4', 'gen_ai', $user_id);
$this->debug_log('['.$id.'][AI视频查询异步队列]保存本地接口返回值 video_url:'.$video_url, $user_id);
......@@ -112,7 +112,7 @@ class AiVideoRetry extends BaseJob
}
// 更新我的试戴记录
AiTryOnModel::where('user_id', $user_id)->where('ai_task_id', $taskid)->update(['ai_status' => 1,'ai_url' => config('shopro.api_host').$video_url, 'ai_err_msg' => '视频已完成']);
AiTryOnModel::where('user_id', $user_id)->where('ai_task_id', $taskid)->update(['ai_status' => 1,'ai_url' => $video_url, 'ai_err_msg' => '视频已完成']);
$this->debug_log('['.$id.'][AI视频查询异步队列]保存本地视频成功 sql: '.db()->getLastSql(), $user_id);
// 发送成功消息通知
......
......@@ -279,10 +279,6 @@ if (typeof Config.upload.storage !== 'undefined' && Config.upload.storage === 'h
delete retParams.hwobstoken;
delete retParams.date;
delete retParams.md5;
// 确保 acl 参数存在
if (!retParams.acl) {
retParams.acl = 'public-read';
}
if (Config.upload.uploadmode !== 'client') {
params.category = files[0].category || '';
}
......@@ -292,12 +288,8 @@ if (typeof Config.upload.storage !== 'undefined' && Config.upload.storage === 'h
this.on("sending", function (file, xhr, formData) {
var that = this;
var _send = xhr.send;
//确保 acl 参数存在
if (!formData.get('acl')) {
formData.append('acl', 'public-read');
}
//仅允许部分字段
var allowFields = ['partNumber', 'uploadId', 'key', 'AccessKeyId', 'policy', 'signature', 'file', 'acl'];
var allowFields = ['partNumber', 'uploadId', 'key', 'AccessKeyId', 'policy', 'signature', 'file','acl'];
formData.forEach(function (value, key) {
if (allowFields.indexOf(key) < 0) {
formData.delete(key);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment